From 4ea4695b57fa91d995ff752359b17ad858d1e8ad Mon Sep 17 00:00:00 2001 From: Ashoat Tevosyan Date: Wed, 2 Oct 2024 23:31:05 -0400 Subject: [PATCH] [landing] Reset messageSentRef.current on error Summary: Some folks reported issues with this flow earlier today. The reports came in within a single hour period, so I suspect transient network issues. I spent some time looking at the code here that handles talking to the relay server, and one potential risk here is that if there's an error after the URL redirect occurs, we'll never retry that step. Probably a good idea to reset this, so that if a retry is necessitated after a URL redirect, we can retry the process from the start (including redoing the URL redirect). Depends on D13580 Test Plan: I tested this one the same as the previous two, which is to say I followed [this doc on Notion](https://www.notion.so/commapp/How-to-test-Farcaster-connect-screen-114d823c518b80cf9b10da4d961bc807) for both physical iOS and Android devices Ideally I'd test the `isError` state here, but it would be really expensive since I'd need to patch `@farcaster/auth-kit` to force `isError`, but that package distributes transpiled source Reviewers: varun, will Subscribers: tomek Differential Revision: https://phab.comm.dev/D13581 --- landing/connect-farcaster.react.js | 1 + 1 file changed, 1 insertion(+) diff --git a/landing/connect-farcaster.react.js b/landing/connect-farcaster.react.js index ab5a871a18..ed089447a3 100644 --- a/landing/connect-farcaster.react.js +++ b/landing/connect-farcaster.react.js @@ -55,6 +55,7 @@ function ConnectFarcaster(): React.Node { return; } if (isError) { + messageSentRef.current = false; reconnect(); }