Add payment link core and custom URI handling - #469
Conversation
3d3dd23 to
730e7e2
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4165d70c81
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3df5c599e0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b4e885847e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0e813dd6ac
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b1dd54bc3f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| final imported = await rust_wallet.importWallet( | ||
| mnemonic: link.mnemonic, | ||
| bip39Passphrase: '', | ||
| birthdayHeight: BigInt.from(link.birthdayHeight), |
There was a problem hiding this comment.
Bound the imported birthday before starting claim sync
When a user opens an attacker-crafted but structurally valid link, the payload can set birthdayHeight to any positive value (for example, 1), and this untrusted value is imported directly before _runBlockingSync runs. Because the claim sync downloads and scans compact blocks from that birthday while the normal wallet sync is paused, such a link can force a foreground full-chain scan of millions of blocks and make the wallet effectively unusable until it completes or the process is killed. Validate the birthday against a recent, locally derived bound before importing the claim account.
AGENTS.md reference: AGENTS.md:L391-L396
Useful? React with 👍 / 👎.
Problem
Vizor needs the payment-link core without adopting the upstream UI. A link carries an ephemeral mnemonic as an unencrypted bearer secret, so the secret must be saved before funding and inbound URIs must never be logged.
Claiming also opens and syncs an isolated wallet database. That sync shares the process-global Rust sync guard with the main wallet, so concurrent execution previously failed with
Sync already running. A locally created claim transaction could also be lost when broadcast returnedpending_broadcastorpartial_broadcastbecause the isolated database was deleted.Solution
vizor://payment-link?p=...payload with validation and a 16 KB input limit.draft,funded,shared, and archive state.pending_broadcastandpartial_broadcastso normal sync can resubmit the locally created transaction. Delete it after a complete broadcast.%uin the packaged Linux AppImage desktop entry.Intentionally out of scope
Validation
flutter analyzepassed.bash -n scripts/package-linux-appimage.shand explicit final-Exec%uchecks passed.git diff --checkpassed.flutter analyzereports only 23 pre-existing Ironwood unused-declaration warnings outside this change.