Hello all!
I had a question about the future of OpenZeppelin-network.js and maybe @ylv-io is the best to answer it.
MetaMask this quarter is planning to stop injecting web3 into applications:
How will this change, if at all, how network.js operates?
Hello all!
I had a question about the future of OpenZeppelin-network.js and maybe @ylv-io is the best to answer it.
MetaMask this quarter is planning to stop injecting web3 into applications:
How will this change, if at all, how network.js operates?
Also to add a bit more context:
Hi @Dennison,
I assume this isn’t an issue. (though will wait for @ylv-io to confirm)
I ran a quick check following this guide to build a dapp with Network.js (https://docs.openzeppelin.com/sdk/2.6/network-js)
I then added display of the web3 version: Version: 1.2.4 when using an injected provider (MetaMask).
//Web3Info.js
import React from 'react';
export default function Web3Info(props) {
const { web3Context } = props;
const { networkId, networkName, providerName, lib } = web3Context;
return (
<div>
<h3> {props.title} </h3>
<div>Network: {networkId ? `${networkId} – ${networkName}` : 'No connection'}</div>
<div>Provider: {providerName}</div>
<div>Version: {lib.version}</div>
</div>
);
}
Network.js uses its own version of web3. It only relies on window.ethereum to be set up with a provider.
A good example how to create you own instance of web3 using window.ethereum.
Thanks everyone! I think that was the information I was looking for!