Page MenuHomePhabricator

[Cashtab] [eToken multisends] Part 1/3 - Frontend scaffolding
Changes PlannedPublic

Authored by emack on Dec 12 2022, 08:17.

Details

Reviewers
bytesofman
kieran709
Group Reviewers
Restricted Project
Summary

T2869

This diff is UI + frontend validation only.

Upgrades the Send Token component to conditionally render the One to Many Token Send input based on the Multiple Recipients toggle, consistent with the Send component.

Smilar to XEC multisends, frontend validation here only checks if each token send amount is less than token.balance. The validation of the aggregate token send amount across all rows will be done in sendToken in the next diff

[Cashtab] [eToken multisends] Part 1/3 - Frontend scaffolding
[Cashtab] [eToken multisends] Part 2/3 - Upgrade sendToken to handle multisends
[Cashtab] [eToken multisends] Part 3/3 - Implement max limit of multi token sends

Test Plan
  • npm test and ensure no snapshot errors
  • npm start
  • navigate to the Send Token component and toggle Multiple Recipients
  • enter a valid ecash address, separated by comma, and a valid token amount and ensure no errors
  • ensure no UI slowdown issues as you type each letter in the input field and it triggers the onChange logicaa
  • enter an valid ecash address with 0 as the token amount and validate the 'Ensure each tx has a valid token amount' error is displayed
  • enter an valid ecash address with a token amount higher than your token balance and validate the 'Ensure each tx has a valid token amount' error is displayed
  • enter an invalid ecash address with a valid token amount and validate the 'Ensure each XEC address is valid' error is displayed
  • enter a space and validate the 'Empty spaces and rows must be removed' error is displayed
  • enter 3-4 rows of valid ecash address with a valid token amount and ensure no errors and console log message of 'Submitting a one to many token transaction' is displayed
  • enable confirmation modal in settings, send a valid token multisend and ensure all outputs are displayed on the modal

Diff Detail

Repository
rABC Bitcoin ABC
Branch
tokenMultiSend
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 21534
Build 42713: Build Diffcashtab-tests
Build 42712: arc lint + arc unit

Event Timeline

emack requested review of this revision.Dec 12 2022, 08:17
emack retitled this revision from [Cashtab] [eToken multisends] Part 1 - Frontend scaffolding to [Cashtab] [eToken multisends] Part 1/3 - Frontend scaffolding.Dec 12 2022, 14:16
emack edited the summary of this revision. (Show Details)
bytesofman added inline comments.
web/cashtab/src/components/Send/SendToken.js
327

Ensure each address is valid

web/cashtab/src/utils/validation.js
514

Must add some unit tests when adding a new function like this

This revision now requires changes to proceed.Dec 12 2022, 15:21
emack planned changes to this revision.Jun 10 2023, 07:41