Page MenuHomePhabricator

[Cashtab] Hide amount in error msg if it is undefined DestinationAddressMulti
ClosedPublic

Authored by kieran709 on Aug 19 2022, 16:55.

Details

Summary

Related to T2615. If the user inputs an invalid XEC address in the DestinationAddressMulti input, the error message should not include the amount param if it is undefined.

Test Plan

cd web/cashtab && npm start
navigate to Send screen
Under the advanced tab, toggle the Multiple Recipients toggle
Input an invalid XEC address
observe that the error message does not read 'undefined' following the comma if the value is undefined

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bytesofman added inline comments.
web/cashtab/src/components/Send/Send.js
574 ↗(On Diff #34719)

We also don't want to display the comma after ${addressString} in this case, e.g.

image.png (380×575 px, 43 KB)

Move the comma into the conditionally rendered area

This revision now requires changes to proceed.Aug 22 2022, 22:37

Responding to review feedback.

bytesofman added inline comments.
web/cashtab/src/components/Send/Send.js
575 ↗(On Diff #34729)

Use `` instead of string addition, i.e.

valueString !== undefined ? `, ${valueString}` : ''
This revision now requires changes to proceed.Aug 23 2022, 17:34

Responding to review feedback

This revision is now accepted and ready to land.Aug 29 2022, 17:33