Page MenuHomePhabricator

[lib/native] introduce useUnlinkFID
ClosedPublic

Authored by ginsu on May 2 2024, 11:42 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 12, 12:20 PM
Unknown Object (File)
Tue, Nov 12, 10:10 AM
Unknown Object (File)
Tue, Nov 12, 9:11 AM
Unknown Object (File)
Tue, Nov 12, 8:45 AM
Unknown Object (File)
Sun, Nov 10, 11:42 AM
Unknown Object (File)
Fri, Nov 8, 7:16 PM
Unknown Object (File)
Fri, Nov 8, 7:16 PM
Unknown Object (File)
Fri, Nov 8, 7:16 PM
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.May 2 2024, 11:53 PM
Harbormaster failed remote builds in B28639: Diff 39757!

will make sure ci passes before landing

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

Improve error handling

ashoat requested changes to this revision.May 3 2024, 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.May 4 2024, 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.May 4 2024, 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.May 14 2024, 9:30 AM
This revision was automatically updated to reflect the committed changes.