Updated on 2026-08-14
This commit is contained in:
parent
e2c5c7ec75
commit
b134a5845a
3 changed files with 10 additions and 9 deletions
|
|
@ -65,15 +65,16 @@ class DialogManager : StoreSubscriber<GlobalState> {
|
|||
messageRes = R.string.wallet_connect_scanner_error_not_valid_card,
|
||||
context = context,
|
||||
)
|
||||
is WalletConnectDialog.AddNetwork ->
|
||||
is WalletConnectDialog.AddNetwork -> {
|
||||
val message = context.getString(
|
||||
R.string.wallet_connect_error_missing_blockchains,
|
||||
) + state.dialog.networks.joinToString()
|
||||
SimpleAlertDialog.create(
|
||||
titleRes = R.string.wallet_connect_title,
|
||||
message = context.getString(
|
||||
R.string.wallet_connect_network_not_found_format,
|
||||
state.dialog.network,
|
||||
),
|
||||
message = message,
|
||||
context = context,
|
||||
)
|
||||
}
|
||||
is WalletConnectDialog.OpeningSessionRejected -> {
|
||||
SimpleAlertDialog.create(
|
||||
titleRes = R.string.wallet_connect_title,
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ class WalletConnectMiddleware {
|
|||
).guard {
|
||||
store.dispatchOnMain(
|
||||
GlobalAction.ShowDialog(
|
||||
WalletConnectDialog.AddNetwork(blockchain.fullName),
|
||||
WalletConnectDialog.AddNetwork(listOf(blockchain.fullName)),
|
||||
),
|
||||
)
|
||||
return@launch
|
||||
|
|
@ -325,7 +325,7 @@ class WalletConnectMiddleware {
|
|||
is WalletConnectError.ApprovalErrorAddNetwork -> {
|
||||
store.dispatchOnMain(
|
||||
GlobalAction.ShowDialog(
|
||||
WalletConnectDialog.UnsupportedNetwork(action.error.networks),
|
||||
WalletConnectDialog.AddNetwork(action.error.networks),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
|
@ -417,7 +417,7 @@ class WalletConnectMiddleware {
|
|||
store.dispatchOnMain(WalletConnectAction.FailureEstablishingSession(session.session))
|
||||
store.dispatchOnMain(
|
||||
GlobalAction.ShowDialog(
|
||||
WalletConnectDialog.AddNetwork(blockchain.fullName),
|
||||
WalletConnectDialog.AddNetwork(listOf(blockchain.fullName)),
|
||||
),
|
||||
)
|
||||
return
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ sealed class WalletConnectDialog : StateDialog {
|
|||
data class ClipboardOrScanQr(val clipboardUri: String) : WalletConnectDialog()
|
||||
object UnsupportedCard : WalletConnectDialog()
|
||||
data class UnsupportedNetwork(val networks: List<String>? = null) : WalletConnectDialog()
|
||||
data class AddNetwork(val network: String) : WalletConnectDialog()
|
||||
data class AddNetwork(val networks: List<String>) : WalletConnectDialog()
|
||||
object OpeningSessionRejected : WalletConnectDialog()
|
||||
object SessionTimeout : WalletConnectDialog()
|
||||
data class ApproveWcSession(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue