Sia-UI
Sia-UI copied to clipboard
Negative funds remaining
Bug
When the sum of the spending totals are more than the allowance, the UI glitches and displays negative SC remaining.
Client/Server Info
Client is on macOS 10.13.0 GM, commit NebulousLabs/Sia-UI@d3aca71 Server is on Ubuntu Server 16.04 LTS, commit NebulousLabs/Sia@f16b5eb
Screenshots
Thanks for the detailed report!
What's the desired behavior here? Seems like the amount spent shouldn't exceed the allowance in the first place, but I guess we shouldn't assume that will never happen. Maybe display 4.63 SC over allowance
in red?
I believe there is a bigger issue with the UI display in the first place since the info that it is giving is very different than what the CLI gives me.
I also was able to decrease my future allowance to 300 SC and well, the UI broke hard and couldn't display the allowance bar without rescaling the window.
Edit: Since GitHub sent my comment a little early, mind if I changed the bug title to "Allowance display problems when spending exceeds allowance"?
Renter info:
Storage Spending: 118.3 SC
Upload Spending: 3.697 SC
Download Spending: 0 H
Unspent Funds: 478.1 SC
Total Allocated: 600.2 SC
Overflowing into menu icons
Contracts text cut off
Looks like it works, minus the SC remaining text
Are you sure the UI is displaying different values than siac
? They both pull from the renter's financialmetrics
API endpoint, so they definitely should not be different. Thanks for the detailed report, there should be a pull request shortly to fix the sizing issues.
Looks like the UI's unspent
calculation was separate from the API. I was able to reproduce this issue, and #728 should resolve it.
Just pulled the branch, bar width issue is fixed but the calculations still seem off.
What does the CLI give you?
siac renter -v
Renter info:
Storage Spending: 121 SC
Upload Spending: 3.813 SC
Download Spending: 0 H
Unspent Funds: 475.4 SC
Total Allocated: 600.2 SC
siac renter allowance
Allowance:
Amount: 300 SC
Period: 12096 blocks