Skip to content

Derive current wallet instead of copying it into every screen - #892

Open
DRadmir wants to merge 2 commits into
mainfrom
wt4/derive-current-wallet
Open

Derive current wallet instead of copying it into every screen#892
DRadmir wants to merge 2 commits into
mainfrom
wt4/derive-current-wallet

Conversation

@DRadmir

@DRadmir DRadmir commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Current wallet is derived from a single source instead of being copied into every screen. Switching wallets rebuilds per-wallet screens automatically, and opening a push notification for another wallet now lands on the right screen reliably.

Closes #833

@DRadmir DRadmir self-assigned this Aug 14, 2026
- Screens observe the wallet row via WalletRequest; per-wallet content is rebuilt through identity on wallet change
- Hoist the three tab NavigationStacks above the identity boundary and rename *NavigationStack views to *NavigationView
- Root observes currentWalletId only for effects; legacy per-screen onChangeWallet syncs removed
- Order deep-link navigation after the wallet switch via a RunLoop hop
- Derive the wallets list checkmark from the session; dismiss the wallets sheet when the last wallet is deleted
- Remove unused setCurrent(index:)
@DRadmir
DRadmir force-pushed the wt4/derive-current-wallet branch from 0197cad to b93891a Compare August 14, 2026 07:08

public let walletQuery: ObservableQuery<WalletRequest>
public var dbWallet: Wallet? {
public var dbWallet: Wallet {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public var dbWallet: Wallet {
public var wallet: Wallet {

can we do this then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wallet state is copied into every screen instead of derived

2 participants