Diff required to implement new send functions. Convert user input into desired targetOutputs for new ecash-coinselect based tx generation fn.
Details
- Reviewers
Fabien - Group Reviewers
Restricted Project - Commits
- rABC097a01f19640: [Cashtab] Add function to generate targetOutputs for multisend tx from user…
npm test
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- cashtab-getMultisendTargetOutputs
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 25978 Build 51530: Build Diff cashtab-tests Build 51529: arc lint + arc unit
Event Timeline
cashtab/src/transactions/__tests__/index.test.js | ||
---|---|---|
54 ↗ | (On Diff #43592) | copy pasta |
cashtab/src/transactions/index.js | ||
122 ↗ | (On Diff #43592) | Don't split twice, it's expensive |
127 ↗ | (On Diff #43592) | There is a lot of sanitizing that is missing here:
|
cashtab/src/transactions/index.js | ||
---|---|---|
127 ↗ | (On Diff #43592) |
Cashtab rejects any input with extra spaces, this will fail address validation in isValidMultiSendUserInput. Arguably we should change to accept the spaces and trim them, will address in a separate diff.
good point + existing issue in multisend validation. Will address and rebase this diff on that fix.
This is handled in isValidMultiSendUserInput
Existing issue, will patch and rebase this diff on the patch. Currently "handled" by impossibility of user having more than XEC supply worth of satoshis to spend. |
Improve validation, support extra spaces, add unit tests to confirm supported cases and errors
Please add another test for extra comma outside of the float, like ecash:qzj5zu6fgg8v2we82gh76xnrk9njcreglum9ffspnr,200.12,foobar, unless it's already tested somewhere else.