-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: Modal loading while staking #147
Conversation
2cacee5
to
0ef462e
Compare
@jrwbabylonlab change variable naming and resolved dev branch conflicts |
@jeremy-babylonlabs we will need to scroll down to hit the "stake" button anyways |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can discuss more on the ux later, lgtm now
Adds loading state while signing the TX.
Problematic part - pradel/react-responsive-modal#504
Currently, react-responsive-modal cannot dynamically update the
ESC
button behavior. I.e. we cannot easily:ESC
button (default behavior)ESC
key because our prop changedSo PreviewModal is not closable via
ESC
by defaultIn terms of our general approach. Since per design we don't have to differentiate between
wallet is signing
andwallet is broadcasting to the blockchain
the whole "disabling" process will be enabled until the wholesigning + broadcasting
finishes. It is reset though once closed or error happens. For example, if we reject from the mobileVideo: https://youtu.be/o7giBbUmWso
Update - even though it's not inside the Design, I assume we want the loading state for unbonding and withdrawing micro modals. Logic is the same - once we are pending action from the wallet (sign unbonding / sign withdrawal + broadcasting) the loading indicator is shown and we cannot close the modal
This change also works with the Keystone
Closes #146