如何将Dapp与MobileWallet进行交互

时间:2019-09-12 01:43:37

标签: react-redux ethereum web3

我正在使用React&Web3js在以太坊上构建dapp应用程序。像往常一样,dapp可能会从Window.web3(MetaMask)获取注入的提供程序。我现在面临的问题是如何允许其他手机钱包签名并访问我的dapp?例如,CryptoKitties和DDEX Exchange平台。 请告知。

import Web3 from "web3"

var  web3 = null
if (typeof window.web3 !== 'undefined') {
      window.ethereum.autoRefreshOnNetworkChange = false;
      web3 =new Web3(window.web3.currentProvider)
    } else {
      web3 = new Web3(new Web3.providers.HttpProvider("https://user01.blockchain.azure.com:3200/xxxxx"));
    }

export default web3;

0 个答案:

没有答案