extension icon indicating copy to clipboard operation
extension copied to clipboard

Block-wallet integration in DAPP issue

Open nenadV91 opened this issue 2 years ago • 2 comments

Describe the bug Hello, I was trying to integrate your wallet as an option in our app called Cowswap. But it looks like requests are not getting to your wallet. I have block wallet installed on chrome as an extension and I can find the provider for your wallet.

To Reproduce Steps to reproduce the behavior:

  1. Go to swap.cow.fi on chrome
  2. Have block-wallet extension installed
  3. Open dev tools and then console
  4. Run const provider = ethereum.providers.find(p => p.isBlockWallet)
  5. Log just provider to see that its there as it should be
  6. Try to request any provider method provider.request({ method: 'eth_requestAccounts' }) or provider.request({ method: 'eth_chainId' })

Expected behavior The promise should resolve with requested data such as accounts or chain id, as it works for other injected wallets

Screenshots Screenshot 2023-03-01 at 12 56 06

As opposed to Tally wallet for example Screenshot 2023-03-01 at 13 05 54

Desktop (please complete the following information):

  • OS: Mac OS Ventura
  • Browser Chrome
  • Version 110.0.5481.177 (Official Build) (arm64)

nenadV91 avatar Mar 01 '23 12:03 nenadV91

hey @nenadV91 , thanks for your submission, we're excited to get our wallet included in Cowswap!

Regarding our provider injection, we use the same approach as MetaMask. You can find our isBlockWallet flag directly in the window.ethereum object:

image

let me know if this helps,

thanks!

julianariel avatar Mar 06 '23 14:03 julianariel

Hey @julianariel thanks for the reply. One issue we have is that if there is Metamask installed we cannot target provider to Blockwallet. Another issue is that in case user has Tally wallet installed, there will be an array of providers ethereum.providers, in there we can select the block provider, but it will not be possible to connect to it.

nenadV91 avatar Mar 29 '23 16:03 nenadV91