feat(ui): two-step signing process to add staking pools #128
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Transaction signing will fail in certain wallets if the signature request isn't triggered by a user action (e.g., a button click). This is a security measure to prevent an app from initiating transaction signatures without the user's knowledge or consent.
Adding a staking pool is a two step process:
The
AddPoolModal
component now presents these actions on a numbered timeline with a progress bar underneath. Once the user selects a node and submits the form, the first signature request is triggered.Upon success a green check appears next to step 1 and its content collapses, while step 2 is expanded/highlighted and the progress bar advances. A button must be clicked again to initiate the MBR payment.
Previously the MBR payment would automatically be triggered on successful pool creation. While Pera/Defly/KMD all support this, Lute Wallet does not and the second transaction request fails (leaving the pool in an invalid "limbo" state).
Other Changes
Speaking of that "limbo" state, I've also limited the ways this modal can be closed. This is to prevent someone from creating the pool and closing the modal (intentionally or accidentally) before sending the MBR payment. Now the only ways to close the
AddPoolModal
are:Finally, a proper
ErrorAlert
component is added here that will be used going forward vs the simple placeholder<p>Error</p>
that has been used since early development.