Options
Explorer recommended wallets
Allows to set default recommended wallets that are fetched from WalletConnect Explorer. You can define a list of wallets ids you'd like to prioritize (order is respected). You can get these ids from the explorer link mentioned before by clicking on a copy icon of your desired wallet card.
val recommendedWalletsIds = listOf<String>(
"1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369",
"4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0"
)
val initParams = Modal.Params.Init(core = CoreClient, recommendedWalletsIds = recommendedWalletsIds)
Web3Modal.initialize(
init = initParams,
onSuccess = {
// Callback will be called if initialization is successful
},
onError = { error ->
// Error will be thrown if there's an issue during initialization
}
)
Explorer excluded wallets
Allows to exclude wallets that are fetched from WalletConnect Explorer. You can define an array of wallet ids you'd like to exclude. You can get these ids from the explorer link mentioned before by clicking on a copy icon of your desired wallet card.
val excludedWalletIds = listOf<String>(
"1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369",
"4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0"
)
val initParams = Modal.Params.Init(core = CoreClient, excludedWalletIds = excludedWalletIds)
Web3Modal.initialize(
init = initParams,
onSuccess = {
// Callback will be called if initialization is successful
},
onError = { error ->
// Error will be thrown if there's an issue during initialization
}
)
Show installed wallets
Allows you to show the INSTALLED
icon in the list. To use this feature, you need to add selected wallets that you want to handle to AndroidManifest.xml
as a query. Specs: Android Specs
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<queries>
<package android:name="..."/>
</queries>
<application>
...
</application>
</manifest>
Enable coinbase
The Coinbase integration is Experimental. It's public API and associated documentation may still see significant and breaking changes.
Coinbase has been added since version 1.2.0
val initParams = Modal.Params.Init(core = CoreClient, coinbaseEnabled = true)
Web3Modal.initialize(
init = initParams,
onSuccess = {
// Callback will be called if initialization is successful
},
onError = { error ->
// Error will be thrown if there's an issue during initialization
}
)
Coinbase Wallet SDK requires Web3Modal registration in Activity to receive responses from Coinbase wallet
fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Web3Modal.register(this)
// Your content
}
Was this helpful?