HomePhabricator
Diffusion Comm 5fd8b49001ca

[landing] Fix SIWE after RainbowKit/Wagmi update

Description

[landing] Fix SIWE after RainbowKit/Wagmi update

Summary:
I'm not sure if this is happening due to the RainbowKit or Wagmi upgrades, but RainbowKit's connectModalOpen is now turning to false a split second before signer is set, which is causing this code to close the modal.

This setTimeout gives us a second to wait and see if signer is set before we decide if the modal closed to the user exiting it or due to a successful wallet auth.

Test Plan: I tested this locally in my dev environment with landing and native both running in dev mode. I tested both X'ing out of the modal (which should trigger this exit condition) and the normal log-in flow (which should NOT trigger)

Reviewers: atul

Reviewed By: atul

Subscribers: tomek

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

Details

Provenance
ashoatAuthored on Feb 14 2023, 2:28 PM
Reviewer
atul
Differential Revision
D6738: [landing] Fix SIWE after RainbowKit/Wagmi update
Parents
rCOMM71cbaade09cb: Revert "[lib] Prepend `expected[Domain/URI` with `web.` to fix SIWE on prod"
Branches
Unknown
Tags
Unknown