Updated on 2026-08-14
This commit is contained in:
parent
e5f2121aea
commit
f7a4e4ddbb
2 changed files with 13 additions and 1 deletions
|
|
@ -227,7 +227,15 @@ class WalletConnectInteractor(
|
|||
}
|
||||
}
|
||||
|
||||
fun isWalletConnectUri(uri: String): Boolean {
|
||||
return uri.lowercase().startsWith(WC_SCHEME)
|
||||
}
|
||||
|
||||
private suspend fun prepareRequestData(sessionRequest: WalletConnectEvents.SessionRequest): WcPreparedRequest? {
|
||||
return sessionRequestConverter.prepareRequest(sessionRequest, userWalletId)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val WC_SCHEME = "wc"
|
||||
}
|
||||
}
|
||||
|
|
@ -70,7 +70,7 @@ class WalletConnectMiddleware {
|
|||
}
|
||||
is WalletConnectAction.StartWalletConnect -> {
|
||||
val uri = action.copiedUri
|
||||
if (uri != null && WalletConnectManager.isCorrectWcUri(uri)) {
|
||||
if (uri != null && isWalletConnectUri(uri)) {
|
||||
store.dispatchOnMain(WalletConnectAction.ShowClipboardOrScanQrDialog(uri))
|
||||
} else {
|
||||
store.dispatchOnMain(NavigationAction.NavigateTo(AppScreen.QrScan))
|
||||
|
|
@ -442,4 +442,8 @@ class WalletConnectMiddleware {
|
|||
)
|
||||
return walletState.getWalletManager(blockchainNetwork)
|
||||
}
|
||||
|
||||
private fun isWalletConnectUri(uri: String): Boolean {
|
||||
return WalletConnectManager.isCorrectWcUri(uri) || walletConnectInteractor.isWalletConnectUri(uri)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue