Skip to content

fix(connect): don't block PSBT approval for already-signed own inputs - #6

Merged
TheArtofSatoshi merged 1 commit into
mainfrom
fix/psbt-signable-blocker
Jul 27, 2026
Merged

fix(connect): don't block PSBT approval for already-signed own inputs#6
TheArtofSatoshi merged 1 commit into
mainfrom
fix/psbt-signable-blocker

Conversation

@cdonnachie

Copy link
Copy Markdown

Summary

Addresses one finding from the #5 code review: enrichPsbt's "none of this transaction's inputs belong to your wallet" blocker was keyed off signableCount, which deliberately excludes inputs that already carry a valid partial signature. That means a PSBT whose wallet-owned inputs are all already signed but not yet finalized (e.g. mid multi-party hand-off, or simply re-opening a request the wallet already signed) tripped the blocker with a misleading reason and no way to proceed — even though the wallet has a legitimate stake in the transaction.

The blocker now checks mineCount (any input recognized as ours, regardless of already-signed status) instead, while signableCount keeps its original meaning for the "N of your inputs will be signed" display text.

Test plan

  • tsc --noEmit clean in packages/app
  • pnpm --filter @photonic/app test — 522 passed

enrichPsbt's "none of this belongs to you" blocker was keyed off
signableCount, which excludes inputs that already carry a valid partial
signature. A PSBT whose wallet-owned inputs are all already signed but
not yet finalized (e.g. mid multi-party hand-off) tripped the wrong
blocker with a misleading reason and no way to proceed. Base the check
on whether any input is recognized as ours at all (mineCount),
regardless of already-signed status, instead.
@TheArtofSatoshi
TheArtofSatoshi merged commit a9d5ff6 into main Jul 27, 2026
1 check failed
@TheArtofSatoshi
TheArtofSatoshi deleted the fix/psbt-signable-blocker branch July 27, 2026 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants