HomePhabricator
Diffusion Comm 36a988adef9b

[native] Check if Farcaster account is already linked in FarcasterWebView

Description

[native] Check if Farcaster account is already linked in FarcasterWebView

Summary:
This addresses ENG-7391. Instead of failing at the registration step later, we want to check if the Farcaster account is already linked at the ConnectFarcaster screen. We think it's a better user experience to "fail fast".

I considered implementing this at the FarcasterWebView layer, so that FarcasterAccountSettings and ConnectFarcasterBottomSheet could use it. But those screens will call the identity service immediately, so there's no point "pre-checking" with the identity service.

Test Plan:
Didn't have Wi-Fi so had to do it fully locally on my laptop.

  1. Set up Android simulator with Google Play services. Log in as real Google account. Install Warpcast and log in as comm.eth
  2. Run landing with yarn prod and keyserver with yarn prod-build, but with keyserver/src/keyserver.js patched to all connections from anywhere (not just localhost). This step is necessary because landing (like web) assumes a local address of localhost and as such can't be loaded from an Android emulator (which sees it as 10.0.2.2)
  3. See video. Note that registration is not possible with this setup because keyserver auth is broken since it tries to talk to prod identity instead of staging identity.

Reviewers: varun, ginsu

Reviewed By: ginsu

Subscribers: tomek

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