PayPro: Fix - verify every output against the signed invoice - #4236
Open
gabrielbazan7 wants to merge 1 commit into
Open
PayPro: Fix - verify every output against the signed invoice#4236gabrielbazan7 wants to merge 1 commit into
gabrielbazan7 wants to merge 1 commit into
Conversation
gabrielbazan7
force-pushed
the
fix/paypro-verify-all-outputs
branch
from
September 2, 2026 11:48
40c5b9a to
e39657d
Compare
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
It changes security-critical PayPro validation behavior across multiple chains and should receive final human review to confirm protocol/edge-case compatibility.
Pull request overview
This PR hardens PayPro transaction proposal verification in bitcore-wallet-client by validating that every output (and chain-specific fields) matches the signed PayPro invoice, closing a gap where a copayer/server could potentially slip unauthorized outputs into a proposal while still passing verification.
Changes:
- Update
Verifier.checkPayproto validate output count, per-output address + amount equality, and additional chain-specific bindings (EVM calldata, XRP destinationTag/invoiceID, SOL memo). - Add regression tests covering UTXO multi-output matching, BCH encoding equivalence, EVM single/multi-step instructions, XRP bindings, and SOL memo binding.
File summaries
| File | Description |
|---|---|
| packages/bitcore-wallet-client/src/lib/verifier.ts | Reworks PayPro verification to compare all expected outputs and enforce chain-specific invariants (EVM/XRP/SOL). |
| packages/bitcore-wallet-client/test/verifier.test.ts | Adds a targeted checkPaypro test suite to prevent regressions across UTXO/EVM/XRP/SOL cases. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes RN-2876 by verifying every PayPro output against the signed invoice.
Changelog
Checklist