-
Notifications
You must be signed in to change notification settings - Fork 63
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
fix: change unit of transaction value result #3057
base: main
Are you sure you want to change the base?
fix: change unit of transaction value result #3057
Conversation
652a601
to
cadb710
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3057 +/- ##
===========================================
- Coverage 79.52% 43.55% -35.97%
===========================================
Files 60 50 -10
Lines 4044 3788 -256
Branches 814 787 -27
===========================================
- Hits 3216 1650 -1566
- Misses 551 1863 +1312
+ Partials 277 275 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
c828f61
to
108c814
Compare
Signed-off-by: Nadezhda Popova <nadezhdapopova@Nadezhdas-Work-MacBook-Pro.local>
Signed-off-by: Nadezhda Popova <nadezhdapopova@Nadezhdas-Work-MacBook-Pro.local>
Signed-off-by: Nadezhda Popova <nadezhdapopova@Nadezhdas-Work-MacBook-Pro.local>
108c814
to
e97dbd5
Compare
Quality Gate passedIssues Measures |
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.
LG, one suggestion
@@ -176,7 +176,7 @@ const formatContractResult = (cr: any) => { | |||
transactionIndex: nullableNumberTo0x(cr.transaction_index), | |||
type: cr.type === null ? '0x0' : nanOrNumberTo0x(cr.type), | |||
v: cr.v === null ? '0x0' : nanOrNumberTo0x(cr.v), | |||
value: nanOrNumberTo0x(cr.amount), | |||
value: nanOrNumberTo0x(cr.amount * constants.TINYBAR_TO_WEIBAR_COEF), |
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.
Make a util function for reusability, then you can add a test
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.
LGTM
Description:
Convert value of a transaction from tinybars to weibars for consistency.
Related issue(s):
Fixes #3053
Notes for reviewer:
Checklist