The dashboard has 6 decimals of precision in most of the fields.
When you look at the amount of coins you have staked, it generally reports something like: 10.123456
However it is possible to enter additional decimal places if you copy and paste the number into the field when staking tokens.
This can create a crash bug if you end up with a number of tokens staked that is between 0 and 0.000001
To Reproduce
Type the number 1.7654321 on a text editor. Then select the number and copy it
Stake xNode tokens. When asked how many tokens to stake, press ctrl-V to paste the number
The screen will show "1.765432"
Stake the tokens
Click "Manage" to manage your xNode tokens
It will say you have 1.765432 tokens staked
Remove 1.765432 tokens. Note that this will leave 0.0000001 tokens staked
When you re-load the screen it will not load completely, then it will go blank and show the message "Application error: a client-side exception has occurred (developer guidance)"
Expected behavior
It should show that you have 0 tokens staked at this point, but otherwise operate normally
Screenshots
If you click the hyperlink, this is the Developer Guidance page you see:
DAppNode version:
Web Node Staking Dashboard.
Additional context
In addition to fixing this out of bounds problem, I suggest adding a "Max" button, so the user can stake or un-stake all the xNode they have, even if it's just a tiny fraction of a token.
It is possible to fix this problem if you can load the page, and quickly click the button to stake xNode, stake 1 xNode, and submit. After the transaction processes you will then have 1.0000001 xNode and the dashboard will work again. It will show you as having 1 xNode.
Describe the bug
The dashboard has 6 decimals of precision in most of the fields.
When you look at the amount of coins you have staked, it generally reports something like: 10.123456
However it is possible to enter additional decimal places if you copy and paste the number into the field when staking tokens.
This can create a crash bug if you end up with a number of tokens staked that is between 0 and 0.000001
To Reproduce
Expected behavior
It should show that you have 0 tokens staked at this point, but otherwise operate normally
Screenshots
If you click the hyperlink, this is the Developer Guidance page you see:
DAppNode version:
Web Node Staking Dashboard.
Additional context
In addition to fixing this out of bounds problem, I suggest adding a "Max" button, so the user can stake or un-stake all the xNode they have, even if it's just a tiny fraction of a token.
It is possible to fix this problem if you can load the page, and quickly click the button to stake xNode, stake 1 xNode, and submit. After the transaction processes you will then have 1.0000001 xNode and the dashboard will work again. It will show you as having 1 xNode.