Page MenuHomePhabricator

[lib] Don't show Farcaster prompt for users after they unlink Farcaster
ClosedPublic

Authored by ashoat on Wed, Oct 16, 8:47 PM.
Tags
None
Referenced Files
F2996101: D13735.id45237.diff
Thu, Oct 17, 12:04 PM
F2995567: D13735.id45237.diff
Thu, Oct 17, 10:05 AM
F2993360: D13735.diff
Thu, Oct 17, 6:38 AM
Subscribers

Details

Summary

If the user unlinks their Farcaster identity, we should set it to NO_FID_METADATA so they don't get prompted again.

Test Plan

I looked through the code for places that call useCurrentUserFID to see where undefined/null is differentiated. I saw that ConnectFarcasterAlertHandler calls shouldSkipConnectFarcasterAlert, which differentiates the two. I confirmed that setting NO_FID_METADATA is better, so that we return null and so that ConnectFarcasterAlertHandler doesn't prompt the user to connect their Farcaster account in this case

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lib/utils/farcaster-utils.js
26 ↗(On Diff #45237)

See here for the significance of setting NO_FID_METADATA instead of wiping the entry. We'll return null here instead of undefined

This revision is now accepted and ready to land.Wed, Oct 16, 10:38 PM