capofficial / capofficial/client

Max Staking CAP Causes MetaMask Error

Open
#60 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Svelte
Stars
4
Forks
78
PR merge metrics
No merged PRs in 30d

Description

Users have reported that when using the max stake shortcut, the rounding up of the wallet balance triggers a MetaMask error.

Wanted to see which approach you preferred to resolve this @kappacappa, or if you have another idea.

#### Add separate Stake/Unstake All buttons to the main staking page that bypass the modals (and rounding) entirely:

![cap_stake_all_unstake_all_buttons](https://user-images.githubusercontent.com/120074542/207697387-bea15f4f-c91b-4e2e-8665-a48cec801f59.png)

Since the current modal is also where CAP approval takes place if needed, might need to add a new ApproveCAP modal to popup if needed.

#### Add "Stake All" and "Unstake All" buttons to the modals which directly trigger the staking/unstaking with exact balances instead of populating the Input component with a rounded value:

![cap_stake_all_modal](https://user-images.githubusercontent.com/120074542/207697399-4ab23b27-60cc-4bf9-8b66-f04decbb08ed.png)

It would probably also make sense to update the modal to display just the "Approve CAP" button and nothing else when the modal opens if CAP allowance is not non-zero.

#### Keep the current design as-is, but do not round up CAP wallet balance.

This would be the simplest fix but also probably the least good from user's perspective IMO.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.