Skip to content

Conversation

@Jon-edge
Copy link
Contributor

@Jon-edge Jon-edge commented Dec 2, 2025

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Description

none

Note

Adds Zcash ZIP-321 Payment URI handling by routing makeSpend to proposeFulfillingPaymentURI and wiring the method through the Zcash IO bridge.

  • Zcash:
    • ZIP-321 URI flow: ZcashEngine.makeSpend now detects edgeSpendInfo.otherParams.zip321Uri and calls synchronizer.proposeFulfillingPaymentURI(...); otherwise falls back to proposeTransfer.
    • IO bridge: Extend ZcashSynchronizer with proposeFulfillingPaymentURI(paymentUri) and proxy to native react-native-zcash synchronizer.
    • Add debugging logs for proposal inputs/results.
  • Docs:
    • Update CHANGELOG.md: add "(Zcash) ZIP-321 URI support" under Unreleased.

Written by Cursor Bugbot for commit 22a8e08. This will update automatically on new commits. Configure here.


@chatgpt-codex-connector
Copy link

💡 Codex Review

this.log(
'[ZEC propose] proposal result ' + JSON.stringify(proposal, null, 2)
)
const totalTxAmount = add(nativeAmount, networkFee)

P1 Badge Use proposal amount when fulfilling ZIP-321 URIs

When zip321Uri is provided the proposal is built via proposeFulfillingPaymentURI, but the spend amount used for fee checks and EdgeTransaction.nativeAmount is still nativeAmount from the spend target (totalTxAmount = add(nativeAmount, networkFee)). If the URI encodes a different amount (e.g., multiple recipients or a UI that leaves nativeAmount empty), the engine will undercount the outgoing value, potentially passing insufficient-funds checks and recording an incorrect debit while broadcasting the larger proposal returned by the synchronizer.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}

const proposal =
zip321Uri != null && synchronizer?.proposeFulfillingPaymentURI != null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The synchronizer?.proposeFulfillingPaymentURI != null is unnecessary as it's required in the type

@Jon-edge Jon-edge enabled auto-merge December 4, 2025 22:18
@Jon-edge Jon-edge merged commit 1f9cd6b into master Dec 4, 2025
3 checks passed
@Jon-edge Jon-edge deleted the jon/zip-321 branch December 4, 2025 22:26
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.

3 participants