As per T2599, this is part of a stacked diff to sign utxos for non-eToken txs by matching wif to address.
This diff aligns the approach in the sendXec() function.
Details
- Reviewers
bytesofman - Group Reviewers
Restricted Project - Commits
- rABC712727ca16c8: [Cashtab] [p1 match wif to address] Align sendXec()s XEC utxo signing approach
npm test
send a 1 to 1 XEC tx and validate outputs in explorer
send a 1 to many XEC tx and validate outputs in explorer
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- sendXecMatchWifToAddr
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 19819 Build 39352: Build Diff cashtab-tests Build 39351: arc lint + arc unit
Event Timeline
web/cashtab/src/hooks/useBCH.js | ||
---|---|---|
1660 | Because the code from const accounts = through defining const utxoEcPair is the same for the sendToken(), createToken(), and sendXec() functions -- define it as a new helper function. const utxoEcPair = (wallet, address) Then part 2 of this diff will be adding this function into createToken(), part 3 will be replacing the code in sendToken() with this new function |
Moved ECPair and signing logic into a separate utility function in cashMethods
Added unit tests
Also just a note that the ECPair and signing logic are inside the same function otherwise it's fairly inefficient duplicating the for loop once for the ECPair matching and then once for the signing.