diff --git a/lib/src/main/kotlin/org/walletconnect/types/TypeMapConversion.kt b/lib/src/main/kotlin/org/walletconnect/types/TypeMapConversion.kt index 1853f3b..d03308d 100644 --- a/lib/src/main/kotlin/org/walletconnect/types/TypeMapConversion.kt +++ b/lib/src/main/kotlin/org/walletconnect/types/TypeMapConversion.kt @@ -46,7 +46,7 @@ fun Session.SessionParams.intoMap(params: MutableMap = mutableMapO fun Map.extractSessionParams(): Session.SessionParams { val approved = this["approved"] as? Boolean ?: throw IllegalArgumentException("approved missing") - val chainId = this["chainId"] as? Long + val chainId = (this["chainId"] as Double).toLong() val accounts = nullOnThrow { (this["accounts"] as? List<*>)?.toStringList() } return Session.SessionParams(approved, chainId, accounts, nullOnThrow { this.extractPeerData() })