[ZCash] Finalize s->t transactions support#32580
Conversation
📋 Code Owners Summary7 file(s) changed, 7 with assigned owners 2 team(s) affected: Owners and Their Files
|
|
A Storybook has been deployed to preview UI for the latest push |
Is this intentional or has it been tested to make sure we're not breaking it unintentionally? |
kdenhartog
left a comment
There was a problem hiding this comment.
Let's make sure we don't accidentally block the UI here, but the rest LGTM
...s/brave_wallet_ui/page/screens/send/components/select_address_modal/select_address_modal.tsx
Show resolved
Hide resolved
|
Cool thanks for double checking, probably an AI hallucination then. |
This PR finalizes s->t transaction support, by integration ZCashCreateOrchardToTransparentTask to ZCashWalletService and adding s->t handling to the UI. Resolves brave/brave-browser#45875
|
[puLL-Merge] - brave/brave-core@32580 DescriptionThis PR adds support for "unshielding" ZCash transactions, which allows users to transfer funds from their shielded (private) Orchard addresses back to transparent (public) addresses. The implementation mirrors the existing shielding functionality but operates in reverse. Key changes include:
Possible Issues
Security Hotspots
Privacy Hotspots
ChangesChangescomponents/brave_wallet/browser/brave_wallet_constants.h
components/brave_wallet/browser/internal/orchard_bundle_manager.cc
components/brave_wallet/browser/zcash/zcash_complete_transaction_task.cc
components/brave_wallet/browser/zcash/zcash_tx_manager.cc
components/brave_wallet/browser/zcash/zcash_wallet_service.cc
components/brave_wallet/browser/zcash/zcash_wallet_service.h
components/brave_wallet/browser/zcash/zcash_wallet_service_unittest.cc
components/brave_wallet/common/brave_wallet.mojom
UI Component Changes (various files)
components/resources/wallet_strings.grdp
sequenceDiagram
participant User
participant UI
participant ZCashTxManager
participant ZCashWalletService
participant CreateTask as CreateOrchardToTransparent<br/>TransactionTask
participant OrchardBundleManager
participant ZCashRpc
User->>UI: Selects shielded asset & transparent address
UI->>ZCashWalletService: GetTransactionType(account, address)
ZCashWalletService->>ZCashWalletService: Check if address is Orchard
ZCashWalletService->>ZCashWalletService: Check if address matches known accounts
alt Matches own transparent address
ZCashWalletService-->>UI: kUnshielding
else External transparent address
ZCashWalletService-->>UI: kOrchardToTransparent
end
User->>UI: Confirms transaction
UI->>ZCashTxManager: AddUnapprovedZCashTransaction()
ZCashTxManager->>ZCashWalletService: CreateOrchardToTransparentTransaction()
ZCashWalletService->>ZCashWalletService: Validate transparent address
ZCashWalletService->>CreateTask: Start()
CreateTask->>OrchardSyncState: GetSpendableNotes()
OrchardSyncState-->>CreateTask: Shielded notes
CreateTask->>OrchardSyncState: CalculateWitnessForCheckpoint()
OrchardSyncState-->>CreateTask: Notes with witnesses
CreateTask->>ZCashRpc: GetTreeState()
ZCashRpc-->>CreateTask: Tree state
CreateTask->>OrchardBundleManager: Create(inputs, outputs=[])
OrchardBundleManager-->>CreateTask: Unsigned bundle
CreateTask-->>ZCashWalletService: ZCashTransaction
ZCashWalletService-->>ZCashTxManager: Transaction
ZCashTxManager-->>UI: Transaction created
User->>UI: Signs & sends
UI->>ZCashWalletService: SignAndPostTransaction()
ZCashWalletService->>OrchardBundleManager: Sign()
OrchardBundleManager-->>ZCashWalletService: Signed transaction data
ZCashWalletService->>ZCashRpc: SendTransaction()
ZCashRpc-->>ZCashWalletService: Success
ZCashWalletService-->>UI: Transaction submitted
UI->>User: Shows "Amount has been unshielded"
|
|
Warning You have got a presubmit warning. Please address it if possible. |
|
Warning You have got a presubmit warning. Please address it if possible. |
|
Warning You have got a presubmit warning. Please address it if possible. |
|
Warning You have got a presubmit warning. Please address it if possible. Items: |
|
Released in v1.87.85 |
|
Verification passed on
brave_btfs5WyIqf.mp4 |


This PR finalizes s->t transaction support, by integration ZCashCreateOrchardToTransparentTask to ZCashWalletService and adding s->t handling to the UI.
Resolves brave/brave-browser#45875
Resolves