how to return wallet accounts to a website via EIP-1193 ? #2330
Replies: 1 comment
-
If you are trying to expose an EIP-1193 interface, you have to create an object which has a It’s a bit complicated to explain, but it’s definitely doable and I’ve done it a few times. This is from a long time ago, before EIP-1193, and it is written in objective-C, but this might help. But you will have to experiment a bit to really get the hang of wrapping the Promise, serializing and using message passing with multiplexing. :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
we are creating a wallet using ethers.js . we open a website in a webview and hook into the EIP 1193 provider. this part is working - the wallet (in React Native) detects actions on the website and responds.
But what we are not able to get right is the returning of the wallet data. we tried a promise, wrapping json-rpc data in a promise, etc but we arent able to make it work. i think its something really simple, but we are really stuck.
Would appreciate any help. this is the code - https://github.com/alekhanetweb/wallet/blob/javascript_insertion_mock_connect/App.js#L132-L142
we have been using pancakeswap website and https://metamask.github.io/test-dapp/ to test
Beta Was this translation helpful? Give feedback.
All reactions