Skip to content

Commit

Permalink
[native] Add loading button state to CreateSIWEBackupMessageBase
Browse files Browse the repository at this point in the history
Summary:
Noticed that when the user presses the button to open `SIWEPanel`, we don't change the button to a loading state like we do for the `ConnectEthereum` screen [here](https://github.com/CommE2E/comm/blob/5b1ddea9fbe3a2d7b65e73193dfa16cda701c995/native/account/registration/connect-ethereum.react.js#L236-L239).

This diff adds the loading state to the button, which improves the responsiveness of the UX.

Test Plan: I tested in my local environment to make sure the button changed to a loading state

Reviewers: will, varun

Reviewed By: varun

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D13804
  • Loading branch information
Ashoat committed Oct 29, 2024
1 parent 7c5ae63 commit b66626c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ const CreateSIWEBackupMessageBase: React.ComponentType<CreateSIWEBackupMessageBa
const newSignatureButtonText = onExistingWalletSignature
? 'Encrypt with new signature'
: 'Encrypt with Ethereum signature';
const newSignatureButtonVariant = onExistingWalletSignature
const defaultNewSignatureButtonVariant = onExistingWalletSignature
? 'outline'
: 'enabled';
const newSignatureButtonVariant =
panelState === 'opening' ? 'loading' : defaultNewSignatureButtonVariant;

let useExistingSignatureButton;
if (onExistingWalletSignature) {
Expand Down

0 comments on commit b66626c

Please sign in to comment.