Page MenuHomePhabricator

[lib/native] introduce useUnlinkFID
ClosedPublic

Authored by ginsu on Thu, May 2, 11:42 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 23, 2:04 PM
Unknown Object (File)
Thu, May 23, 10:41 AM
Unknown Object (File)
Thu, May 23, 10:01 AM
Unknown Object (File)
Thu, May 23, 8:49 AM
Unknown Object (File)
Thu, May 23, 12:18 AM
Unknown Object (File)
Sun, May 12, 1:42 PM
Unknown Object (File)
Sun, May 12, 10:45 AM
Unknown Object (File)
Sun, May 12, 12:37 AM
Subscribers

Details

Summary

This diff introduces useUnlinkFID which is a hook that returns a callback that calls the unlinkFarcasterAccount identity rpc and then clears the fid from the synced metadata client store

Linear task: https://linear.app/comm/issue/ENG-7412/call-unlink-farcaster-rpc-on-the-client

Depends on D11863

Test Plan

Confirmed that the fid was being cleared from the synced metadata client store + confirmed in meeting with @varun that I was correctly calling and getting the expected behavior of unlinkFarcasterAccount RPC

Confirmed that loading + error states worked as expected

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ginsu added reviewers: varun, will.
ginsu edited the summary of this revision. (Show Details)
Harbormaster returned this revision to the author for changes because remote builds failed.Thu, May 2, 11:53 PM
Harbormaster failed remote builds in B28639: Diff 39757!

will make sure ci passes before landing

ginsu requested review of this revision.Thu, May 2, 11:54 PM

Improve error handling

ashoat requested changes to this revision.Fri, May 3, 12:27 PM
ashoat added inline comments.
native/profile/farcaster-account-settings.react.js
31 ↗(On Diff #39757)

What happens on error? Should we show an Alert to the user to explain that it failed?

(Ah you planned changes before I requested them, cool)

ashoat requested changes to this revision.Sat, May 4, 11:38 AM
ashoat added inline comments.
native/profile/farcaster-account-settings.react.js
33 ↗(On Diff #39782)

How do we handle in-progress state here while we’re waiting for the identity service to be called? Should we keep the spinner spinning?

This revision now requires changes to proceed.Sat, May 4, 11:38 AM

Thanks! Please always keep in mind progress and loading state going forward. As a frontend dev, those things need to be second nature to you, and not something you should be relying on reviewers to catch

This revision is now accepted and ready to land.Tue, May 14, 9:30 AM
This revision was automatically updated to reflect the committed changes.