In part 3 of D11491, I made us ignore walletconnect_modal_update with height: 0 because I wanted to avoid a jitter that occurred before these events came before siwe_closed events.
(That jitter has improved since D11948, but is still there.)
The changes I made in D11491 made us also ignore walletconnect_modal_update events when a wallet was successfully connected. I figured this was a good idea because the WalletConnect modal was always larger than the normal modal.
However, in ENG-9537 I discovered that on Android, the WalletConnect modal was smaller than the normal modal, and our failure to resize after it was closed was causing the button to render almost off-screen.
This diff adds code to differentiate between the two cases of walletconnect_modal_update with height: 0:
- The jitter case, where a siwe_closed event will be received within 50ms.
- The success case, where we want to resize back to the normal size.
We differentiate these cases by starting a timer, and seeing if the modal was closed within 50ms.