test(swift-sdk): update address vectors to DIP-0018 after #4021#4024
Conversation
Merge v4.1-dev and fix the Swift test breakage #4021 left behind: it moved AddressValidator / AddressTransformer to the DIP-0018 HRPs ("tdash"/"dash") without updating SwiftTests, so the legacy "tdashevo1..." vectors in ValidationTests now (correctly) fail validation and the suite is red on v4.1-dev itself. - testValidateBech32mAddress_valid / testValidateAddress_autoDetect: use a real proof-verified testnet address (tdash1kzdl4c...). - testValidateBech32mAddress_invalid: assert the pre-DIP-0018 HRP is rejected — a regression pin on #4021's behavior change. - testParseAddressBech32m: was silently vacuous ("nil or 21 bytes" with a vector that now always decodes to nil) — assert the real address yields the 21-byte payload and the legacy HRP yields nil. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 12 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Issue being fixed or feature implemented
#4021 moved
AddressValidator/AddressTransformerto the DIP-0018 HRPs (tdash/dash) but did not updateSwiftTests/, so the legacytdashevo1…vectors now (correctly) fail validation and the Swift package test suite is red onv4.1-dev—ValidationTests.testValidateBech32mAddress_validandtestValidateAddress_autoDetectfail on CI. (This fix rode on the #4019 branch but landed just after that PR was squash-merged, so it needs its own PR.)What was done?
testValidateBech32mAddress_valid/testValidateAddress_autoDetect: vectors replaced with a real proof-verified testnet platform address (tdash1kzdl4c…).testValidateBech32mAddress_invalid: the pre-DIP-0018tdashevo1…vector added as an explicitly rejected case — a regression pin on fix(swift-sdk): decode DIP-0018 platform addresses in address queries #4021's behavior change.DataTransformersTests.testParseAddressBech32m: was silently vacuous (nil || count == 21with a vector that now always decodes to nil) — now asserts the real address yields the 21-byte payload and the legacy HRP yields nil.How was it tested?
Full Swift package suite via
run_tests.sh(the CI job's runner script): TEST SUCCEEDED, withValidationTests,DataTransformersTests, andAddressBalancePersistTestsall passing.Breaking changes
None (test-only).
Checklist
For repository code-owners and collaborators only
🤖 Generated with Claude Code