Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block-wallet integration in DAPP issue #369

Open
nenadV91 opened this issue Mar 1, 2023 · 2 comments
Open

Block-wallet integration in DAPP issue #369

nenadV91 opened this issue Mar 1, 2023 · 2 comments

Comments

@nenadV91
Copy link

nenadV91 commented Mar 1, 2023

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)
@julianariel
Copy link
Contributor

julianariel commented Mar 6, 2023

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!

@nenadV91
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants