Updated on 2026-08-14
This commit is contained in:
parent
99a5efd7e2
commit
00171d2276
11 changed files with 102 additions and 7 deletions
|
|
@ -177,7 +177,7 @@ private fun AlertContentDescription(alert: AlertsComponent.AlertType, modifier:
|
|||
R.string.wc_alert_unsupported_method_description,
|
||||
)
|
||||
is AlertsComponent.AlertType.RequiredAddNetwork -> stringResourceSafe(
|
||||
R.string.wc_alert_unsupported_method_description,
|
||||
R.string.wc_alert_add_network_to_portfolio_description,
|
||||
alert.network,
|
||||
)
|
||||
is AlertsComponent.AlertType.RequiredReconnectWithNetwork -> stringResourceSafe(
|
||||
|
|
|
|||
|
|
@ -60,7 +60,9 @@ internal class WcAddNetworkModel @Inject constructor(
|
|||
val either = useCase.invoke()
|
||||
either
|
||||
.onLeft { router.push(WcHandleMethodErrorConverter.convert(it)) }
|
||||
.map { showUI() }
|
||||
.map {
|
||||
if (it.isExistInWcSession) cancel(useCase) else showUI()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,13 @@ internal class WcSwitchNetworkModel @Inject constructor(
|
|||
useCase.reject()
|
||||
either
|
||||
.onLeft { showErrorDialog(it) }
|
||||
.map { showErrorDialog(HandleMethodError.RequiredNetwork(it.network.name)) }
|
||||
.map {
|
||||
if (it.isExistInWcSession) {
|
||||
router.pop()
|
||||
} else {
|
||||
showErrorDialog(HandleMethodError.RequiredNetwork(it.network.name))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue