Page MenuHomePhabricator

[landing] Use connectModalOpen exposed by RainbowKit
ClosedPublic

Authored by ashoat on May 8 2024, 12:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 11, 6:29 PM
Unknown Object (File)
Mon, Nov 11, 1:07 PM
Unknown Object (File)
Mon, Nov 11, 1:07 PM
Unknown Object (File)
Mon, Nov 11, 8:42 AM
Unknown Object (File)
Fri, Oct 25, 10:38 PM
Unknown Object (File)
Oct 11 2024, 1:06 AM
Unknown Object (File)
Oct 11 2024, 1:06 AM
Unknown Object (File)
Oct 11 2024, 1:06 AM
Subscribers

Details

Summary

When we initially introduced this, I wasn't able to find any place where connectModalOpen was exposed, so we patched RainbowKit to expose useModalState. The value of connectModalOpen there turns to false when the WalletConnect modal is opened, so we had to add some hacks for it to work correctly.

It looks like now RainbowKit exposes connectModalOpen to consumers of the library. On top of that, the value of this connectModalOpen actually does not turn to false when the WalletConnect modal opens, so it lets us simplify some of our logic and get rid of some hacks.

This also solves ENG-8043, which occurred because the timeout in the old hacky code could be exceeded.

Test Plan

In my iOS simulator:

  1. I logged the values of the old connectModalOpen and the new one side-by-side and saw what the values were (I had to forward the message from landing to native)
  2. I tested several scenarios of closing/opening parts of the modal:
    • Open the WalletConnect modal
    • Open the QR code in the WalletConnect modal
    • Go back from the QR code
    • Go back from the WalletConnect modal
    • Close the modal by pressing the "X"
    • Successfully auth

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage