Page MenuHomePhabricator

[landing] Fix detection of RainbowKit modal dismissal
ClosedPublic

Authored by ashoat on Jun 19 2023, 4:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 10, 1:59 PM
Unknown Object (File)
Oct 27 2024, 8:19 AM
Unknown Object (File)
Oct 22 2024, 2:57 PM
Unknown Object (File)
Oct 22 2024, 2:56 AM
Unknown Object (File)
Sep 29 2024, 4:46 AM
Unknown Object (File)
Sep 29 2024, 4:46 AM
Unknown Object (File)
Sep 1 2024, 4:05 PM
Unknown Object (File)
Aug 29 2024, 4:18 AM
Subscribers

Details

Summary

After the RainbowKit update, this was broken and was detecting modal dismissal when the WalletConnect modal was opened.

To address this, I added some state that tracks whether the WalletConnect modal is open, and disabled the dismiss behavior while it's open.

Depends on D8252

Test Plan

Tested with the rest of the stack. I tested all three SIWE endpoints:

  1. Web
  2. Native (old flow)
  3. Native (new flow)

For each, I tested both Rainbow and WalletConnect (both of which need WalletConnect), and navigated around the WalletConnect modal to various places.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

landing/siwe.react.js
116 ↗(On Diff #27871)

I had to bump this for things to work well. I think it takes a while for the result of the setState to trickle in. I determined this value by timing how long it would take... observed 100ms, so I bumped to 250ms for safety.

This revision is now accepted and ready to land.Jun 21 2023, 6:49 AM