HomePhabricator

[Cashtab] Clear input forms when user toggles between single and multi-send

Description

[Cashtab] Clear input forms when user toggles between single and multi-send

Summary:
T2070

Stale task but this is still an edge case issue. I think the original rationale is that we don't want users to "lose" all of their multisend inputs if they typed it in and then accidentally toggled the switch.

But current behavior is worse. If user

  1. enters correct multi-send info
  2. toggles back to single send
  3. clicks 'send'

They are prompted "are you sure you want to send <correct details of multisend tx>?" -- which then simply does not send. Or, if they don't have "send confirmations" enabled, they get a validation error for amount being empty.

Form should clear and this confusing behavior should be eliminated. Case to be made for persisting multi-send msg but it should be done by storing in its own state field if we really need this.

Test Plan:
npm test

npm start
populate 'send to' and 'amount' fields
toggle on 'multiple recipients'
note forms are clear
correctly fill out multisend info
toggle off 'multiple recipients'
note forms are clear

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
bytesofmanAuthored on Sep 20 2023, 19:09
bytesofmanPushed on Sep 21 2023, 12:23
Reviewer
Restricted Project
Differential Revision
D14512: [Cashtab] Clear input forms when user toggles between single and multi-send
Parents
rABC6991ac9fccd4: [apps] Consistently apply naming convention for mocha unit test files
Branches
Unknown
Tags
Unknown