Page MenuHomePhabricator

[native] Split onClosing and onClosed params to SIWEPanel
ClosedPublic

Authored by ashoat on May 16 2023, 12:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 4, 6:52 AM
Unknown Object (File)
Tue, Oct 1, 9:58 PM
Unknown Object (File)
Tue, Sep 17, 4:47 AM
Unknown Object (File)
Tue, Sep 17, 4:47 AM
Unknown Object (File)
Tue, Sep 17, 4:47 AM
Unknown Object (File)
Tue, Sep 17, 4:44 AM
Unknown Object (File)
Sun, Sep 15, 2:56 PM
Unknown Object (File)
Aug 28 2024, 6:46 PM
Subscribers

Details

Summary

Today, SIWEPanel takes a single onClose that gets called in two scenarios:

  1. The user has closed the bottom sheet, and its dismissal animation is beginning
  2. The dismissal animation has completed

In the case of FullscreenSIWEPanel (the only existing usage), we don't distinguish between these two because we need to animate back to the prompt screen anyways. We want to start that animation as soon as possible, and can defer the "unrender" of SIWEPanel until that animation completes.

However, in the upcoming new usage for the ConnectEthereum screen, we don't have any need for a secondary animation like that. We can't "unrender" SIWEPanel until the primary animation has completed, and so our options are to either sleep for some time (bad), or to separate these two callbacks (better).

Test Plan

I tested all ways of closing the SIWEPanel:

  1. Pressing the main LoggedOutModal back button
  2. Swiping the bottom sheet closed
  3. Pressing the close button inside the WebView. (Note that pressing the WalletConnect close button doesn't work, but this doesn't work currently anyways)

Diff Detail

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