HomePhabricator
Diffusion Comm 439d7b216b1e

[landing] Use connectModalOpen exposed by RainbowKit

Description

[landing] Use connectModalOpen exposed by RainbowKit

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

Reviewers: ginsu

Reviewed By: ginsu

Subscribers: tomek

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

Details

Provenance
ashoatAuthored on May 8 2024, 12:08 PM
Reviewer
ginsu
Differential Revision
D11948: [landing] Use connectModalOpen exposed by RainbowKit
Parents
rCOMM98a5b78ebcf7: [terraform] Create an alarm for when the identity ECS task stops
Branches
Unknown
Tags
Unknown