Skip to content

imToken Wallet

Compare
Choose a tag to compare
@lnbc1QWFyb24 lnbc1QWFyb24 released this 07 Apr 04:59
077d561

This release adds support for imToken wallet. The imToken provider does not support eth_balance rpc calls, so if you would like the balance subscription to work as it does on other wallets you will need to pass in an optional rpcUrl into the wallet initialization object:

const config = {
  // ...other config options
  walletSelect: {
    wallets: [
      { walletName: 'imToken', rpcUrl: '<RPC_ENDPOINT>' }
    ]
  }
}

const onboard = Onboard(config)

If you don't pass in a rpcUrl the wallet will function as normal, but the balance subscription will never get updated as it will have no way of getting access to the wallet's balance.

Also included in this release is a change to the Trust wallet module to allow the same functionality for wallet balance as the Trust wallet provider also doesn't allow eth_balance rpc calls. So you can now pass in an rpcUrl to the Trust wallet initialization object for balance updates:

const config = {
  // ...other config options
  walletSelect: {
    wallets: [
      { walletName: 'trust', rpcUrl: '<RPC_ENDPOINT>' }
    ]
  }
}

const onboard = Onboard(config)

NOTE: When you pass in the rpcUrl it will be for the network that your app is running on, so when the balance subscription is called, the balance value will reflect the balance of that address on the network that your app is running on not necessarily the network that the user's wallet is connected to.

Changelog:

  • Feature: imtoken wallet (#284)
  • Enhancement: Trust Balance (#286)