The process of associated with. I tell you to fish it.
The problem is that the component of the Web3provider will expel the steering object to be sparkling, but if you are the code you are your code, you are yu’re yu’re entrance to access his direct fractic and correspondence.
He is your code update with the necessary changes:
`Sx
Import to react, {useless, usestate jeter "Recare";
Import {ED ETHERS} fro 'ethers';
Import {Agreement Both, Contracting 'S J
Permanent ethereum = () => {
Const [accounts, certificates] = useste ([]);
using () ugly => {
// Set the service provider and get the accounts
Continue employees = non -ethers.providers.web3provider (Window.etherreum);
Const Contalist = Expect a service provider.
Set the account (account lists);
/// If an account is not found, try to connect to Ethereum Neck Yan
IIF (aaccounts.lengh = = 0) {
condo.log ("There are no accounts we like.");
}
}, []);
return (
ether
{/ Your ReAct app container /}
)
- -
export default Ethereum;
s
In this updated version, the utility is used to save the list of accounts. Wat companion launched to connect to the Ethereum network using Provoid and Gettables. If there are no accounts, it is a monthly logic.
The man is the difference that we are now handing over the processing object with the component’s ether property, instya teting access or correspondence.
Make the highest “ethers.js” by launching NPM installations or Yan Add to Ethers in your project directory.