Updated on 2026-08-14
This commit is contained in:
parent
ebcaa7bf72
commit
f88f21668a
2 changed files with 6 additions and 3 deletions
|
|
@ -19,8 +19,11 @@ class CreateTwinWalletMiddleware {
|
|||
when (action) {
|
||||
is DetailsAction.CreateTwinWalletAction.ShowWarning -> {
|
||||
val wallet = store.state.detailsState.wallet
|
||||
val notEmpty = wallet?.recentTransactions?.isNullOrEmpty() != true ||
|
||||
wallet.amounts.toSendableAmounts().isNotEmpty()
|
||||
if (wallet == null) {
|
||||
store.dispatch(NavigationAction.NavigateTo(AppScreen.CreateTwinWalletWarning))
|
||||
return
|
||||
}
|
||||
val notEmpty = wallet.recentTransactions.isNotEmpty() || wallet.amounts.toSendableAmounts().isNotEmpty()
|
||||
if (notEmpty) {
|
||||
store.dispatch(DetailsAction.CreateTwinWalletAction.NotEmpty)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue