Skip to content

fix: handle pendingTransactionId and transaction review URLs - #41

Merged
tysonwil merged 2 commits into
mainfrom
tyson/eng-6540-swift-flutter-sdks-handle-pendingtransactionid-and
Mar 16, 2026
Merged

fix: handle pendingTransactionId and transaction review URLs#41
tysonwil merged 2 commits into
mainfrom
tyson/eng-6540-swift-flutter-sdks-handle-pendingtransactionid-and

Conversation

@tysonwil

Copy link
Copy Markdown
Collaborator

Summary

  • Add ParaError.transactionDenied error case — thrown when a permissions policy blocks signing
  • Add setTransactionReviewHandler() — registers a handler that auto-opens the review URL before throwing
  • Add checkForTransactionDenial() private helper in signing methods
  • No breaking API changes — existing callers work unchanged, denial is surfaced as a catchable error

Test plan

  • Swift SDK builds clean
  • Example app builds and runs on simulator
  • Message signing and transaction signing verified on iOS simulator
  • No changes to example app required (existing error handling catches the new error)

Ref: ENG-6540

🤖 Generated with Claude Code

tysonwil and others added 2 commits March 16, 2026 15:28
…ing methods

When a partner has permissions policies enabled and a signing operation
requires approval, the backend returns pendingTransactionId instead of a
signature. This change adds proper handling for this case:

- signMessage/signTransaction now return SigningResult enum (.success/.denied)
- Add TransactionDeniedResult with pendingTransactionId and transactionReviewUrl
- Add setTransactionReviewHandler() for auto-opening review URLs in-app
- Update signSolanaSerializedTransaction return type to match

Ref: ENG-6540

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…enum

Reverts the SigningResult enum approach. Instead, signing methods keep
their existing SignatureResult return type and throw
ParaError.transactionDenied when a permissions policy blocks the
operation. No breaking API changes.

- Add ParaError.transactionDenied(pendingTransactionId:, transactionReviewUrl:)
- Add setTransactionReviewHandler() — auto-opens review URL before throwing
- Add checkForTransactionDenial() helper in signing methods

Ref: ENG-6540

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


I'll analyze this and get back to you.

@tysonwil
tysonwil requested a review from jlm0 March 16, 2026 23:07
@tysonwil
tysonwil merged commit d9d2303 into main Mar 16, 2026
2 of 4 checks passed
@tysonwil
tysonwil deleted the tyson/eng-6540-swift-flutter-sdks-handle-pendingtransactionid-and branch March 16, 2026 23:14
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