tgrospic / rnode-client-js

Web example https://tgrospic.github.io/rnode-client-js
MIT License
19 stars 19 forks source link

eth provider failed on mobile #11

Open dckc opened 4 years ago

dckc commented 4 years ago

I tried trust wallet. A colleague tried metamask.

I wonder if this we're using the current API or whatever.

https://github.com/tgrospic/rnode-client-js/blob/e4d97ee436a9a35ed2fe7b6c3307d03e4e2e9612/src/eth/eth-wrapper.js#L1

tgrospic commented 4 years ago

I was using latest documentation for Metamask. https://metamask.github.io/metamask-docs/guide/ethereum-provider.html#methods-new-api

Request for signature is in Ethereum format defined in EIP-1193. https://eips.ethereum.org/EIPS/eip-1193 https://github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_sign

I'm not aware how browser extensions like Metamask can be run on mobile. I'm especially interested in using WebAuthn to connect directly from a web page. https://www.w3.org/TR/webauthn/

dckc commented 4 years ago

The MetaMask extension provider is synchronously injected, while the MetaMask mobile provider is asynchronously injected. -- @metamask/detect-provider - npm

dckc commented 4 years ago

suggested fix for this and #15 : https://github.com/rchain-community/rchain-api/blob/master/src/ethProvider.js#L4-L59