# Instructions to set viewing key when keplr not working

**URL:** <https://forum.scrt.network/t/instructions-to-set-viewing-key-when-keplr-not-working/6219>\
**Category:** Secret Contracts and Secret Apps\
**Created:** [August 10, 2022, 12:35am UTC](https://forum.scrt.network/t/instructions-to-set-viewing-key-when-keplr-not-working/6219 "2022-08-10T00:35:31Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![stevenchang5000](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/stevenchang5000/32/1697_2.png) [@stevenchang5000](https://forum.scrt.network/u/stevenchang5000)\
**Post date:** [August 10, 2022, 12:35am UTC](https://forum.scrt.network/t/instructions-to-set-viewing-key-when-keplr-not-working/6219/1 "2022-08-10T00:35:31Z")

</div>

People are struggling to set viewing keys right now through keplr. This is a way to get around it.

1. Get the contract address you want to set the viewing key.  
a. Go to [Button Swap | Secret network | btn.group](https://btn.group/secret_network/button_swap)  
b. Click on the ‘View’ button next to balance and copy contract address from ‘Add Token’ pop up.

![Screen_Shot_2022-08-10_at_9.52.33_am](https://canada1.discourse-cdn.com/flex035/uploads/enigma1/original/2X/a/aae1030e1703e7f6b3cd68e223cf749fbf10480a.png)

 ![Screen Shot 2022-08-10 at 9.54.14 am](https://canada1.discourse-cdn.com/flex035/uploads/enigma1/original/2X/d/d4728f94db6eff04025683bd26b208b7a7c1e8e1.png)

1. Click ‘Submit’
2. Copy the provided key then click ‘Reject’.  
 ![Screen_Shot_2022-08-10_at_9.54.36_am](https://canada1.discourse-cdn.com/flex035/uploads/enigma1/original/2X/1/149b05037fbfa964d967b3e4cebd0b358502f9cb.png)
3. Goto the [Smart contract interface | Secret network | btn.group](https://btn.group/secret_network/smart_contract_interface)
4. Fill the Smart contract interface page as such:  
a. Change from Query to Handle  
b. Paste token contract address from before  
c. Input ‘set\_viewing\_key’ into ‘Function name’ field  
d. Click on ‘+ PARAM’  
e. In the ‘Key’ input, enter type ‘key’  
f. In ‘Value’, paste the key you copied before.  
 ![Screen_Shot_2022-08-10_at_9.55.41_am](https://canada1.discourse-cdn.com/flex035/uploads/enigma1/original/2X/0/0aa7e19802d1944b064aefd8165ce4ea2cacf8e6.png)
5. Click ‘Submit’ and confirm both pop ups. The first one is to estimate the gas required and the second is to submit the actual transaction.
6. Once successful, go back to button swap page and click on the view button again.
7. This time click on checkbox ‘(Advanced) Import my own viewing key’.  
 ![Screen_Shot_2022-08-10_at_9.56.03_am](https://canada1.discourse-cdn.com/flex035/uploads/enigma1/original/2X/e/ea3f386ea3b2a017f9098e8df271a73e682cfc1e.png)
8. Input the viewing key and press Submit again.  
Done!

Extra info: Keplr stores your viewing key for each token. Things are most likely broken right now because keplr is submitting the transaction to set the viewing key, but then not receiving confirmation and storing the viewing key.

---

_[View the full topic](https://forum.scrt.network/t/instructions-to-set-viewing-key-when-keplr-not-working/6219)._
