Conversation
Add a shared wallet state machine for connection, network mismatch, and errors. Block write hooks unless a wallet is connected, pass the configured network to wallet signers, and cover transitions with fake-adapter tests. Closes BCPathway#953
|
@deslawson Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
p3ris0n
left a comment
There was a problem hiding this comment.
Review
This covers #953.
- The wallet reducer exposes
disconnected,connecting,connected,wrong-network, anderror, anduseWalletshares that state. useMint,useTransfer,useApprove, anduseBurnthrow before submit unless status isconnected.- A rejected connect lands in
error, and a passphrase mismatch lands inwrong-networkwithout registering the adapter. Fake-adapter tests cover those transitions. - Freighter and Albedo report a network passphrase and receive the configured network when signing.
One non-blocking note: Cargo.lock only adds bc-forge-flash-loan-guard. It is unrelated to the wallet machine. It is harmless if that crate is already a workspace member, but it should not have ridden along.
CI is green and the branch merges cleanly. Approving.
|
Approved above, and CI on this head is still green. I did not merge it. After #1019 and #1061 landed, this branch is now CONFLICTING with main ( |
1 similar comment
|
Approved above, and CI on this head is still green. I did not merge it. After #1019 and #1061 landed, this branch is now CONFLICTING with main ( |
What does this PR do?
Add a shared wallet state machine for connection, network mismatch, and errors. Block write hooks unless a wallet is connected, pass the configured network to wallet signers, and cover transitions with fake-adapter tests.
Type of change
Checklist
pre-commit run --all-fileslocally and it passedBreaking changes?
No. The wallet status and network signing parameters are additive; existing adapter implementations remain compatible.
Related issues
Closes #953