Repository navigation
Replace react-native-piratechain with react-native-pirate-wallet - #6021
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
bd3b5d1 to
6b506f3
Compare
54f256b to
f39d1ec
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
f39d1ec to
d8fb58d
Compare
There was a problem hiding this comment.
Claude Code Review
Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.
Tip: disable this comment in your organization's Code Review settings.
c33d0ab to
eeb10b6
Compare
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
5f0115d to
0512bed
Compare
peachbits
left a comment
There was a problem hiding this comment.
Reviewed the native-dependency swap and the send-path changes. The prepare.sh addition is the main one — the script it calls is clean, but the package's podspec already runs it with --force at pod install time, so the line looks redundant. Skipping the edge-currency-accountbased pin, already covered above.
0512bed to
5a0ef14
Compare
|
Addressed all three threads: the prepare.sh assembly line is removed (the podspec's --force path verified by deleting the framework and running pod install), the footprint is stated in the description, and the send scene keeps the plugin's message with the localized line as the fallback. |
5a0ef14 to
23988a6
Compare
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
23988a6 to
8699fb7
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8699fb7. Configure here.
8699fb7 to
3280be2
Compare
3280be2 to
ad7f8e5
Compare
The send scene's address tile renders Enter/Myself/Scan/Paste as icon buttons whose labels only appear in an aggregated parent accessibilityText, so maestro cannot select them by text and every automated send drive had to fall back to coordinate taps.
The Pirate Chain team's unified wallet SDK ships a React Native binding, react-native-pirate-wallet, that replaces the react-native-piratechain wrapper Edge wrote. The reimplemented piratechain plugin in edge-currency-accountbased consumes it through the same makePiratechainIo nativeIo bridge, so the GUI side is the dependency swap. The package comes from npm at 0.3.4. The wrapper tarball carries the JS and bridge sources; the native artifacts ship as five optional sidecar packages (android, android-x86_64, ios-device, and one thin iOS simulator archive per architecture), and scripts/prepare.sh runs the wrapper's assembly script, which fuses the simulator archives with lipo into the PirateWalletNative.xcframework the podspec vendors, so preparing the app needs Xcode's command line tools. The podspec links the Security framework for the keychain-backed registry credential.
ad7f8e5 to
bba94f1
Compare
| "react-native-performance": "^5.1.4", | ||
| "react-native-permissions": "^4.1.5", | ||
| "react-native-piratechain": "0.6.3", | ||
| "react-native-pirate-wallet": "0.3.4", |
There was a problem hiding this comment.
🔒 Agentic Security Review
Severity: MEDIUM
Description: ARRR native spend code is now linked from PirateNetwork npm prebuilt companions (react-native-pirate-wallet@0.3.4 plus optional android/ios tarballs) instead of the Edge-published react-native-piratechain wrapper. Edge release/CI only enforces lockfile integrity and does not verify npm SLSA/OIDC provenance or rebuild those JNI/xcframework blobs.
Impact: This PR adds a new in-process trust root for wallet-key material. A hostile or substituted libpirate_ffi_native.so / PirateWalletNative.xcframework in those tarballs is autolinked into the Edge Android/iOS binary and runs with the app process, so it can steal or redirect Pirate Chain keys and signed transactions and can also reach other secrets in the same process. Sibling privacy-coin modules (react-native-zcash, react-native-monero) remain Edge-published; this swap drops that Edge-owned native packaging gate for ARRR.
Remediation: Keep the exact lockfile pins. Add an Edge-enforced gate before merge/release: npm provenance verify that the six 0.3.4 attestations bind to PirateNetwork/Pirate-Unified-Light-Wallet and the expected workflow/tag, or pin GitHub-release tarball hashes from that project's signature/SBOM, or vendor/rebuild the native slices under an Edge-controlled package as with react-native-zcash/react-native-monero.

Technical Design Document
piratechain-unified-wallet-sdk.md
, committed on the plugin branch. It holds the design and the test evidence for both PRs in this pair. Read it instead of a long description here.
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
EdgeApp/edge-currency-accountbased#1055
Requirements
If you have made any visual changes to the GUI. Make sure you have:
Description
Asana: https://app.asana.com/0/1215088146871429/1214721783909451
Swaps
react-native-piratechainforreact-native-pirate-wallet@0.3.4(unified wallet SDK). The reimplemented plugin in EdgeApp/edge-currency-accountbased#1055 consumes it through the existingmakePiratechainIonativeIo bridge, so this side is the dependency swap, fourtestIDs on the send scene's address tile (whose icon buttons an automated drive cannot otherwise select by text), and one send-scene error mapping.The error mapping:
ErrorCardshows a specific message only for anI18nErrorand otherwise falls back to "An unexpected error occurred. Please check your network connection and try again later." A wallet whose balance exists but is not spendable yet reports that asPendingFundsError, which the plugin now throws for the Pirate Chain spend-anchor window and monero already throws for unconfirmed funds. Both ofSendScene2's catches turn it into anI18nErrorthat keeps the plugin's own message when it set one (the Pirate Chain engine names syncing, rescanning or witness repair from the SDK'sreasonCode) and otherwise shows "These funds are not spendable yet. Wait for the wallet to finish syncing, then try again." Ethereum's pending-transaction case carries the same error type with a sentinel message and keeps its own warning card, so it is matched first and left alone.The wrapper tarball carries only JS and the ObjC/Swift/Kotlin bridge. Its native binaries arrive as five
optionalDependenciespinned to the wrapper version: two Android packages, one iOS device package, and one package per iOS simulator architecture, which0.3.2split apart so a developer pulls only what their machine runs. The iOS three are markedos: ["darwin"], so Linux CI skips them; the two Android packages carry noosorcpugate, so every runner and every Mac downloads both. Footprint: about 850MB ofnode_moduleson a Mac (device 191MB, each simulator slice about 190MB, Android 180MB plus 101MB) against 79MB forreact-native-piratechain@0.6.1. The xcframework assembly runs from the package's own podspec atpod install(top-level Ruby,--force, raises if the framework is missing), soscripts/prepare.shno longer calls it; deleting the assembled framework and runningpod installreproducesios-arm64(arm64) andios-arm64_x86_64-simulator(x86_64 + arm64). The podspec links theSecurityframework for the keychain-backed registry credential the plugin now uses.Landing order: #1055 has to publish first. Published
edge-currency-accountbased@4.87.0imports the module this branch removes, so a build without #1055 linked in fails at "Bundle React Native code and images".Earlier revisions of this description carried the arm64 Debug link failure as a shipping blocker and the ARRR broadcast timeout as an open SDK defect. Both are settled and written up in the doc: the link failure is Debug-only, with a local Release device build and a Jenkins cheese build of this branch both green, and the broadcast takes 2.083 seconds.
The new copy was captured on the simulator against a real trigger, not a forced one: the SDK rejected a funded ARRR broadcast with
ERR_WITNESS_REPAIR_QUEUED, and the scene rendered the wait-and-retry message where it had shown the network-error card. Screenshots are in a comment below.Tested on the iOS simulator with #1055 linked in via updot: the app builds and launches with the
0.3.4binaries, the plugin loads, a wallet restored from the account archive synced through the new keychain-backed registry, and a funded ARRR send reached the transaction-success scene through a signing session (txid93f42a33af4161d697277f050da1c65c1dbf267c2aafdeaa1329ba063f64fbcb; the0.3.2round's send was239ab8743afbed4f8047ed4e0b05d2aa3e39ebfa7ab9824ddfa52c72c47c4205).The previous revision of this paragraph reported ARRR scan throughput collapsing to a few blocks per second and blamed
0.3.2. A controlled cold-sync A/B on this round found otherwise:0.3.2reaches the chain tip in 95 seconds againstlightwalletd2.cryptoforge.ccand needs half an hour againstlightd1.pirate.black, where0.3.0takes 72 seconds. The regression is an interaction with that one endpoint, not the SDK, so the bump stands and #1055 moves the endpoint. Section 7 of the doc has the matrix.Note
Medium Risk
Replaces ARRR’s native wallet stack and adjusts send broadcast/error handling; correctness depends on the linked currency plugin and new prebuilt native binaries.
Overview
Swaps Pirate Chain’s native dependency from
react-native-piratechaintoreact-native-pirate-wallet@0.3.4, including npm lockfiles and iOS CocoaPods (OpenSSL/SQLite/SwiftProtobuf bumps follow the new pod). This pairs with the account-based plugin that consumes the unified wallet SDK; without that plugin release, the app won’t resolve the old module at bundle time.Send flow: When a wallet reports
PendingFundsError(not-yet-spendable balance—common for ARRR spend-anchor / sync states and similar Monero cases),SendScene2now surfaces the plugin message or a dedicated “funds not spendable yet” string instead of the generic network error card. On broadcast refusal before submission, the send slider re-arms (broadcast lock cleared); Ethereum’s existing “Unexpected pending transactions” path is unchanged.Automation: Adds
testIDs on the send address tile actions (enter, scan, paste, myself) for Maestro. CHANGELOG documents the SDK swap and the send error fix.Reviewed by Cursor Bugbot for commit bba94f1. Bugbot is set up for automated code reviews on this repo. Configure here.
Test evidence
d774d70test: add missing testIDs for maestro selectors
arrr synced 0.3.0
arrr send ready
arrr send success
arrr balance after send
arrr synced 0.3.2 tls pool
arrr send success 0.3.2 tls
arrr txid 0.3.2 tls
5a0ef14Name the not-yet-spendable send error
🪓 forced the bridge's getSpendability in the updot-baked plugin copy to return spendable:false with reasonCode ERR_WITNESS_REPAIR_QUEUED (frames 04, 05) then ERR_SYNC_FINALIZING (frame 06); reverted, git status clean.
before generic error
not spendable error
keychain registry syncing
transaction success
txid
max fills spendable balance
send armed
transaction success
🪓 max refused witness repair
🪓 not spendable witness repair
🪓 not spendable sync finalizing
send armed fresh registry
transaction success fresh registry