Skip to content

Commit

Permalink
Enable more Evm chains for WalletConnect
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelekol committed Apr 24, 2024
1 parent 29e87a5 commit 71e16c7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ android {
compileSdk compile_sdk_version
minSdkVersion min_sdk_version
targetSdkVersion compile_sdk_version
versionCode 104
versionCode 105
versionName "0.38.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,15 @@ class WCSessionViewModel(
private fun getSupportedNamespaces(accounts: List<String>): Map<String, Wallet.Model.Namespace.Session> {
return mapOf(
"eip155" to Wallet.Model.Namespace.Session(
chains = listOf("eip155:1", "eip155:56"),
chains = listOf(
"eip155:1",
"eip155:56",
"eip155:137",
"eip155:10",
"eip155:42161",
"eip155:43114",
"eip155:100",
),
methods = listOf(
"eth_sendTransaction",
"personal_sign",
Expand All @@ -469,7 +477,15 @@ class WCSessionViewModel(
}

private fun getSupportedBlockchains(account: Account): List<WCBlockchain> {
val chains = listOf(Chain.Ethereum, Chain.BinanceSmartChain)
val chains = listOf(
Chain.Ethereum,
Chain.BinanceSmartChain,
Chain.Polygon,
Chain.Optimism,
Chain.ArbitrumOne,
Chain.Avalanche,
Chain.Gnosis,
)
return chains.map {
val address = getEvmAddress(account, it).eip55
WCBlockchain(it.id, it.name, address)
Expand Down

0 comments on commit 71e16c7

Please sign in to comment.