# Add Leap to existing Keplr integration

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:&#x20;

* 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:

```tsx
window.addEventListener('leap_keystorechange', reconnectWallet)
```

* Now replace `window.keplr` with `window.wallet` in the whole application
* Replace the following:

```jsx
window.getOfflineSigner
window.getOfflineSignerOnlyAmino
window.getOfflineSignerAuto
window.getEnigmaUtils
```

with

```jsx
window.leap.getOfflineSigner
window.leap.getOfflineSignerOnlyAmino
window.leap.getOfflineSignerAuto
window.leap.getEnigmaUtils
```

For Leap assets, such as the wallet name, logo, and redirection link, please refer to our [documentation here](/cosmos/resources/leap-assets.md). These assets are useful in case Leap wallet is not installed.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.leapwallet.io/cosmos/for-dapps-connect-to-leap/add-leap-to-existing-keplr-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
