useDApp icon indicating copy to clipboard operation
useDApp copied to clipboard

Doubt with installation documentation - Binance - Testnet

Open damianlluch opened this issue 4 years ago • 2 comments

Hi, in the documentation you have this example for the setup with Infura for Ethereum. I need the project to work with Binance, I am not clear what data would go here:

const config: Config = {
  readOnlyChainId: { Mainnet.chainID,
  readOnlyUrls: {
    [Mainnet.chainID]: 'https://mainnet.infura.io/v3/62687d1a985d4508b2b7a24827551934',
  },
}

The binance / testnet RPC?

thanks

damianlluch avatar Dec 16 '21 17:12 damianlluch

I have followed the example in the documentation, adding a simple button to call the function to connect the wallet and I don't get any error, but I do get this warning

any suggestions?

isLocalChain is deprecated, can call with Chain directly

my code:

src/index.tsx

  readOnlyChainId: BSCTestnet.chainId,
  readOnlyUrls: {
    [BSCTestnet.chainId]: 'https://data-seed-prebsc-1-s1.binance.org:8545/',
  },
}

ReactDOM.render(
  <React.StrictMode>
    <DAppProvider config={config}>
      <App />
    </DAppProvider>
  </React.StrictMode>,
  document.getElementById('root')
)`


my component:



const SelectWallet:React.FC<RadioType> = ({ selected, setSelected}) =>  {
  const { activateBrowserWallet, account } = useEthers()
return (
  <div>
    <button
            type="button"
            onClick={() => activateBrowserWallet()}
          >Connect
          </button>
    </div>
    )`

damianlluch avatar Dec 16 '21 19:12 damianlluch

I have the same issue, although it does work when it is deployed, which is weird.

mcgingras avatar Dec 26 '21 03:12 mcgingras