WalletStatusPanel
Drop-in wallet panel for example apps.
Renders a compact pill anchored top-right (e.g. 10K · 167.3 · ✓). Tap to expand a ModalBottomSheet with the wallet address, full balance, and three actions: read balance, wait for funding, register for dust.
Typical usage:
Box(modifier = Modifier.fillMaxSize()) {
// your app's main content
YourScreen()
// pill anchored top-right; sheet appears on tap
WalletStatusPanel(
network = MidnightNetwork.UNDEPLOYED,
modifier = Modifier.align(Alignment.TopEnd).padding(12.dp),
)
}State ownership: the panel ships its own WalletPanelViewModel which handles SeedVault unlock + SDK bootstrap. Host apps do not need to hold any wallet state. If a host wants to drive the panel from its own ViewModel (e.g. share the SDK with other features), pass a custom viewModel.
Parameters
Network the panel starts on. The user can change it via the sheet's network chip row — that selection is owned inside the panel from then on, the host doesn't need to track it for wallet use.
Modifier applied to the pill — typical placement is Modifier.align(Alignment.TopEnd).padding(...).
UI palette; defaults match dark-themed example apps.
Custom panel VM. Defaults to one obtained from Hilt via hiltViewModel.
Fires after the user picks a new network in the sheet's chip row. Defaults to no-op; useful for example apps whose contract operations (deploy / connect) need to target the same chain the wallet is on — they can mirror this into their own state.