HomePhabricator

[Cashtab] Patch decimal parsing of params in wallet, extension, and components

Description

[Cashtab] Patch decimal parsing of params in wallet, extension, and components

Summary:
T1865

Replace lingering hardcoded "8"s with the appropriate cashDecimals param. This supports correctly parsing a passed address amount param in satoshis as XEC (and not BCHA).

Because the extension parses such values from cashtab-components, the extension version and components version must both be bumped with this update.

Test Plan:
npm start

  1. Copy paste this string into the XEC Address field: ecash:qpmrf4857pu2pvn8hwdh0y64wwdmxqh7jc85c2zf3w?amount=2004016
  1. Verify that the app autocompletes 20040.16 in the XEC send field
  1. Run the latest version of the browser extension locally

npm run extension
Navigate to brave://extensions
Click "Load Unpacked" and select the /web/cashtab/extension/dist folder, or click "Update" if this is already in your extensions; should be version 1.0.2
Disable the production version of the extension so only the local version is running

  1. Load cashtab-components locally
cd /web/cashtab-components
npm i
npm run storybook
  1. Click on the dark blue button on various "CashtabBadge" components; verify that the extension loads with the correct XEC send amount

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Subscribers: PiRK

Differential Revision: https://reviews.bitcoinabc.org/D10138

Details

Provenance
Joey King <joseph.roy.king@gmail.com>Authored on Sep 16 2021, 15:00
bytesofmanPushed on Sep 16 2021, 16:55
Reviewer
Restricted Project
Differential Revision
D10138: [Cashtab] Patch decimal parsing of params in wallet, extension, and components
Parents
rABCe3c96f8ddab2: Fix spelling of "unreachable" in OP_CHECKMULTISIG
Branches
Unknown
Tags
Unknown