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

Ensure that the dApp works on wallets with dApp browser #223

Closed
kelsos opened this issue Jul 25, 2019 · 3 comments · Fixed by #259
Closed

Ensure that the dApp works on wallets with dApp browser #223

kelsos opened this issue Jul 25, 2019 · 3 comments · Fixed by #259
Assignees
Labels
3 bug 🕷️ Something isn't working sdk 🖥

Comments

@kelsos
Copy link
Contributor

kelsos commented Jul 25, 2019

Description

Out of curiosity yesterday I tried to check how the dApp runs in status.im. Apparently, it doesn't after spending a bit investigating I found out that a raidenShutdown is fired immediately after raidenInit.

{
  meta: undefined
  payload: {reason: Error: The method eth_sign does not exist/is not available at Object.eval [as   callback] (webpac…}
  type: "raidenShutdown"
}

https://medium.com/metamask/the-new-secure-way-to-sign-data-in-your-browser-6af9dd2a1527

Acceptance criteria

  • Works in Status and imToken
  • Needs to be tested with https

Tasks

  • [ ]

Story Points

@kelsos kelsos added bug 🕷️ Something isn't working sdk 🖥 labels Jul 25, 2019
@andrevmatos
Copy link
Contributor

To clarify, we actually use the personal_sign proposal from EIP191. There're some inconsistencies between clients exposing this EIP signature format through eth_sign additionally or exclusivelly, which led to this issue. We expected ethers.Signer.signMessage to do the right choice, as it complies with that format, but seems we'll need some workaround for status for it to do the right thing.

@christianbrb christianbrb modified the milestone: Product Backlog Aug 8, 2019
@christianbrb christianbrb added the 3 label Aug 8, 2019
@nephix nephix self-assigned this Aug 13, 2019
@nephix
Copy link
Contributor

nephix commented Aug 13, 2019

I'm going to look into this, there seems to be a workaround as explained on ethers-io/ethers.js#491 (comment)

@andrevmatos
Copy link
Contributor

Seems ethers special-case Metamask here, if the AsyncSendable.isMetaMask is truthy. We just need to do the same for these wallets which doesn't support eth_sign. I'd rather detect and set earlier than catch, to avoid the erroring overhead when possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 bug 🕷️ Something isn't working sdk 🖥
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants