HomePhabricator
Diffusion Comm db7542de41c8

[native] fix farcaster prompt being displayed to users with fid on login

Description

[native] fix farcaster prompt being displayed to users with fid on login

Summary:
Was doing some final testing, and ran into an issue where a user who had already created a farcaster association and had an fid linked to their comm account was getting shown the connect to farcaster prompt whenever they logged back in.

Did some digging, and it looks like the cause of this issue is that when a user logs back the fid is not set (since the user logged out and the data in the synced metadata table was deleted) until the identity service returns the fid stored from the service. This means that initially the ConnectFarcasterAlertHandler thinks that the user does not have an fid and will show the prompt.

To fix this I added an additional check where if the user does not have an fid set in redux, then we should also query and check the identity service and see if the user has an fid there

Eventually when the synced metadata table store can sync + share the data to other clients through the backup service and tunnelbroker this check won't be necessary

Test Plan:
Logged out and back in of the user with the fid and confirmed that this issue was no longer occuring

In this demo Bruce has a fid in the identity service and should not get the farcaster prompt and dennis does not have an fid set in the identity service and should get the farcaster prompt

Reviewers: ashoat, inka

Reviewed By: ashoat

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D12718

Details