Skip to content

test(swift-sdk): assert transaction decoder error cases#3993

Open
thepastaclaw wants to merge 1 commit into
dashpay:feat/core-tx-decode-ffifrom
thepastaclaw:reviewbot-3981-coderabbit
Open

test(swift-sdk): assert transaction decoder error cases#3993
thepastaclaw wants to merge 1 commit into
dashpay:feat/core-tx-decode-ffifrom
thepastaclaw:reviewbot-3981-coderabbit

Conversation

@thepastaclaw

@thepastaclaw thepastaclaw commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • removes a tautological double-reversal assertion from testTxidDisplayHexMatchesExplorerOrder
  • asserts specific PlatformWalletError cases for malformed/trailing transaction bytes and empty input

Validation

  • git diff --check
  • bash build_ios.sh --target mac --profile dev built DashSDKFFI.xcframework for macOS, then failed the script follow-up iOS Simulator app build because this invocation only produced a macOS library
  • swift test --filter TransactionDecoderTests/testMalformedBytesThrowDeserialization passed
  • swift test --filter TransactionDecoderTests/testEmptyInputThrowsInvalidParameter passed
  • swift test --filter TransactionDecoderTests still fails 4 decode happy-path tests with deserialization("IO error") using the freshly built FFI slice; the two changed error-path tests pass

Addresses CodeRabbit feedback on #3981.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bfb82431-dfe9-4557-a7ae-3b847adf3f68

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@thepastaclaw

thepastaclaw commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator Author

✅ Review complete (commit f0b9a25)

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Code Review

Test-only PR that removes a tautological double-reversal assertion and tightens two error-path tests to match specific PlatformWalletError cases (.deserialization and .invalidParameter). All four reviewers independently converged on no in-scope findings; the assertions correctly correspond to the enum in PlatformWalletResult.swift and the documented TransactionDecoder.decode behavior. No consensus-critical or FFI-boundary concerns.

Note: GitHub does not allow me to approve my own PR, so this is posted as a COMMENT while preserving the verified clean review.

Source: reviewers: opus (general), claude-sonnet-5 (general), gpt-5.5[high] (general, failed_or_unparseable), opus (ffi-engineer), claude-sonnet-5 (ffi-engineer), gpt-5.5[high] (ffi-engineer, failed_or_unparseable); verifier: opus; specialists: ffi-engineer

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.

1 participant