Page MenuHomePhabricator

[Cashtab] Parse amount param in XEC
ClosedPublic

Authored by kieran709 on May 2 2022, 18:34.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Commits
rABC688711121371: [Cashtab] Parse amount param in XEC
Summary

Changed the handling of the amount param in Cashtab to ensure consistency with other XEC wallets. Related to task T2338.

Test Plan

cd web/cashtab && npm start
navigate to send screen
input an eCash address with an amount param including decimals
ensure tx goes through
input an eCash address with an amount param without decimals
ensure tx goes through

Diff Detail

Repository
rABC Bitcoin ABC
Branch
parse-xec-patch
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 18923
Build 37622: Build Diffcashtab-tests
Build 37621: arc lint + arc unit

Event Timeline

bytesofman requested changes to this revision.May 2 2022, 22:19
bytesofman added inline comments.
web/cashtab/src/components/Common/Ticker.js
129

This is no longer true, replace // Amount in satoshis with // Amount in currency.cashDecimals unit

132

No need to divide the amount by 1. Remove this logic ;)

This revision now requires changes to proceed.May 2 2022, 22:19

responding to review feedback

bytesofman requested changes to this revision.May 2 2022, 23:27
bytesofman added inline comments.
web/cashtab/src/components/Common/Ticker.js
129 ↗(On Diff #33369)

Sorry, I added an update to this, please use Amount in XEC as it is hard coded and does not change with currency.cashDecimals

Eventually, we will deprecate the currency.cashDecimals param

129

Actually, use // Amount in XEC -- this is the standard, and in this case the parsing is not impacted by the currency.cashDecimals param.

This revision now requires changes to proceed.May 2 2022, 23:27

Responding to review feedback

This revision is now accepted and ready to land.May 3 2022, 18:04
This revision was automatically updated to reflect the committed changes.