Skip to content

Own current wallet state in a single session service - #834

Merged
DRadmir merged 1 commit into
mainfrom
wt2/ios-wallet-session-owner
Aug 5, 2026
Merged

Own current wallet state in a single session service#834
DRadmir merged 1 commit into
mainfrom
wt2/ios-wallet-session-owner

Conversation

@DRadmir

@DRadmir DRadmir commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

The current wallet had two owners: WalletService re-published six members of WalletSessionService word for word, and both sat in the SwiftUI environment at once, so screens picked whichever one they happened to know about.

Now WalletSessionService owns the current wallet, and WalletService only handles the wallet lifecycle. Screens that just need to know which wallet is selected no longer receive a service that can also export a secret phrase.

No behaviour change.

WalletService re-published six members of WalletSessionService verbatim,
and both were registered side by side in the SwiftUI environment, so the
same state had two access paths and three setter shapes.

Delete the forwarders and move setCurrent(wallet:) onto
WalletSessionManageable, keeping its MainActor hop. WalletService is now
lifecycle only: create, import, delete, pin, rename, setup, export.

Consumers that only need the current wallet take the protocol instead of
the concrete service, so NFT, Transfer, Transactions and WalletTab no
longer depend on WalletService and its transitive Keystore edge.
InAppNotificationService kept a walletService it never read.
@DRadmir DRadmir self-assigned this Aug 5, 2026
@DRadmir
DRadmir merged commit 4f67e4b into main Aug 5, 2026
2 checks passed
@DRadmir
DRadmir deleted the wt2/ios-wallet-session-owner branch August 5, 2026 06:08
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.

1 participant