[Bug] BalanceString comes rounded
See original GitHub issueHello,
I just noticed this issue in my dev environment, and I haven’t been able to see where the problem is. I suspect in the backend.
Environment Details
- Node Version: 10
- BitGoJS Version: N/A (the call to get wallets https://api.bitgo.com/docs/#operation/v2.wallet.get does not touch the sdk. as per https://github.com/andreujuanc/BitGoJS/blob/master/modules/express/src/clientRoutes.ts#L869
- BitGo Environment: testnet
Expected Behavior
balance: 58584981,
confirmedBalance: 58584981,
spendableBalance: 58584981,
balanceString: '0.58584981',
confirmedBalanceString: '58584981',
spendableBalanceString: '58584981',
Current Behavior
balance: 58584981,
confirmedBalance: 58584981,
spendableBalance: 58584981,
balanceString: '0.585850', <- HERE 😢
confirmedBalanceString: '58584981',
spendableBalanceString: '58584981',
Possible Solution
It is documented that the balance string should return native, in this case satoshis, and it also shuold never lose precision. And it’s doing the opposite.
Steps to Reproduce
https://api.bitgo.com/docs/#operation/v2.wallet.get Testnet Address: 2MzBEeH3xMfJwb2ycZfmgJdHUfuKLfcszLw Wallet Label: 4ee87039-ce80-46db-b97f-95345b47c074
Ill keep trying to see if it’s a problem on my side. Help is appreciated it none the less.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
swing - Java rounded corner bug - Stack Overflow
I'm working on a GUI in Java, and I'm trying to give rounded corners to my borders. JPanel recentProjectsPanel = new JPanel(); ...
Read more >Object Wrapup - Washington
Object Wrapup. Key concepts. Interface; Initializing Objects: the Constructor; Information hiding (a little). Introduction.
Read more >Bug: Rounding Error on a number that isn't being rounded
I get frustrated with having to wrap my things that have rounding errors with Round()… I got the same issue but with super...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, this looks like a rounding issue in our backend. We’ll look into it - thanks 👍
I’ll close this ticket, as I think we have a resolution here and there’s no evidence of issues on our end.