Add Leap to existing Keplr integration
If Connect to Keplr already exists on your dapp, adding Leap is easy because we've followed a similar API structure
Similar to Keplr, you can find an object named 'leap' in the window object, which can be accessed using window.leap
To support Leap cosmos wallet on a dapp where Keplr is already integrated, follow these steps:
A Modal will be required for a user to select Leap or Keplr.
The dapp will have to maintain a persistent state to store which wallet is connected.
Based on the connected wallet, set
window.wallet = window.leap
Also, add the following event accordingly:
Now replace
window.keplr
withwindow.wallet
in the whole applicationReplace the following:
with
Last updated