Page MenuHomePhabricator

[landing] Fix SIWE after RainbowKit/Wagmi update
ClosedPublic

Authored by ashoat on Feb 14 2023, 2:30 PM.
Tags
None
Referenced Files
F3490118: D6738.id22611.diff
Wed, Dec 18, 3:04 PM
F3489341: D6738.diff
Wed, Dec 18, 12:09 PM
Unknown Object (File)
Thu, Nov 21, 5:21 AM
Unknown Object (File)
Thu, Nov 21, 5:21 AM
Unknown Object (File)
Thu, Nov 21, 5:21 AM
Unknown Object (File)
Wed, Nov 20, 4:19 PM
Unknown Object (File)
Nov 10 2024, 6:41 AM
Unknown Object (File)
Nov 10 2024, 6:41 AM
Subscribers

Details

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)

Diff Detail

Repository
rCOMM Comm
Branch
ashoat/siwe
Lint
No Lint Coverage
Unit
No Test Coverage