Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ruixhuang committed Dec 16, 2024
1 parent 50c27bd commit c31a881
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,9 @@ class WalletConnectModalProvider(
val approvedSsssion = approvedSession.namespaces[ethNamespace]

val requestChainId = requestingWallet?.chainId
val walletChainIds = approvedSsssion?.chains?.map {
it.split(":")[1]
val walletChainIds = approvedSsssion?.chains?.mapNotNull {
val components = it.split(":")
if (components.size > 1) components[1] else null
} ?: emptyList()
if (requestChainId != null && !walletChainIds.contains(requestChainId)) {
for (connectCompletion in connectCompletions) {
Expand Down

0 comments on commit c31a881

Please sign in to comment.