-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return FP strings for getunclaimedgas #1572
Conversation
@@ -25,7 +25,7 @@ type unclaimedGas struct { | |||
func (g UnclaimedGas) MarshalJSON() ([]byte, error) { | |||
gas := &unclaimedGas{ | |||
Address: address.Uint160ToString(g.Address), | |||
Unclaimed: g.Unclaimed.String(), | |||
Unclaimed: util.DecimalToString(&g.Unclaimed, 8), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, it's really a question if big.Int
is suitable here. Technically, it'd be nice to have GAS values using the same type in every case.
cbececc has incorrect (after the move) commit message prefix. But this also allows us to fix neo-project/neo#2082 easily now, let's do that. |
Just noticed that linter isn't happy. We can merge this and then fix neo-project/neo#2082 in a separate PR. |
Codecov Report
@@ Coverage Diff @@
## master #1572 +/- ##
==========================================
+ Coverage 76.18% 81.34% +5.16%
==========================================
Files 238 239 +1
Lines 18758 18779 +21
==========================================
+ Hits 14291 15276 +985
+ Misses 3466 2513 -953
+ Partials 1001 990 -11
Continue to review full report at Codecov.
|
Close #1570 .
We use
big.Int
there, so I've implemented functions inutil
. They could be used in future in other places.