Updated on 2026-08-14
This commit is contained in:
parent
f5b2046666
commit
e8a2b10e6f
10 changed files with 170 additions and 19 deletions
|
|
@ -174,8 +174,8 @@ internal class DefaultWalletRouter(
|
|||
reduxNavController.navigate(action = NavigationAction.NavigateTo(AppScreen.ManageTokens))
|
||||
}
|
||||
|
||||
override fun openScanFailedDialog() {
|
||||
reduxStateHolder.dispatchDialogShow(StateDialog.ScanFailsDialog(StateDialog.ScanFailsSource.MAIN))
|
||||
override fun openScanFailedDialog(onTryAgain: () -> Unit) {
|
||||
reduxStateHolder.dispatchDialogShow(StateDialog.ScanFailsDialog(StateDialog.ScanFailsSource.MAIN, onTryAgain))
|
||||
}
|
||||
|
||||
private companion object {
|
||||
|
|
|
|||
|
|
@ -59,5 +59,5 @@ internal interface InnerWalletRouter : WalletRouter {
|
|||
fun openManageTokensScreen()
|
||||
|
||||
/** Open scan failed dialog */
|
||||
fun openScanFailedDialog()
|
||||
fun openScanFailedDialog(onTryAgain: () -> Unit)
|
||||
}
|
||||
|
|
@ -165,7 +165,10 @@ internal class WalletWarningsClickIntentsImplementor @Inject constructor(
|
|||
|
||||
override fun onScanToUnlockWalletClick() {
|
||||
analyticsEventHandler.send(MainScreen.UnlockWithCardScan)
|
||||
openScanCardDialog()
|
||||
}
|
||||
|
||||
private fun openScanCardDialog() {
|
||||
viewModelScope.launch(dispatchers.main) {
|
||||
scanCardToUnlockWalletClickHandler(walletId = stateHolder.getSelectedWalletId())
|
||||
.onLeft { error ->
|
||||
|
|
@ -175,7 +178,7 @@ internal class WalletWarningsClickIntentsImplementor @Inject constructor(
|
|||
event = WalletEvent.ShowAlert(WalletAlertState.WrongCardIsScanned),
|
||||
)
|
||||
}
|
||||
ScanCardToUnlockWalletError.ManyScanFails -> router.openScanFailedDialog()
|
||||
ScanCardToUnlockWalletError.ManyScanFails -> router.openScanFailedDialog(::openScanCardDialog)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue