我正在使用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;