HomePhabricator

[Cashtab] Special handling for tx inputs that are required and do not require…

Description

[Cashtab] Special handling for tx inputs that are required and do not require wallet signature

Summary:
Another special case uncovered in developing NFT trading.

Some txs may have requiredInputs. Some special cases of these txs may have requiredInputs that do not need a "normal" p2pkh signature from the wallet.

It is impractical to store all Cashtab utxos as "pre-signed" (well...we could do this? Seems like a bad idea. No guarantee the user is expected to always spend all his inputs).

So, we need some way of distinguishing between "inputs that need to be signed" (like required SLP inputs) and "inputs that are completely ready for ecash-lib tx builder" (for now, only found in ecash-agora).

Note that we do not yet test the case of a requiredInput that is pre-signed in the sendXec function because we do not yet have the ecash-agora dependency or any ecash-agora txs in Cashtab. However, we do test that this change does not break any existing tx building, and that the new function meets expected behavior.

Test Plan: npm test

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

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

Details

Provenance
bytesofmanAuthored on Jul 12 2024, 21:14
bytesofmanPushed on Jul 14 2024, 12:47
Reviewer
Restricted Project
Differential Revision
D16461: [Cashtab] Special handling for tx inputs that are required and do not require wallet signature
Parents
rABC0f69d70a11ba: [Cashtab] Update paywall article link
Branches
Unknown
Tags
Unknown