Metamask: Only one account is listed by the configured Web3Provider

Problem Problem Provier Metask: A single account **

Assuming you configure Ethers.JS together with Metask, accommodation. This article will be in the main cause of a problem and will provide a step -by -step solution.

problem:

When estimated metamark as an Ethereum supplier, it may be detected (or wallet). This may have a debt due to various reasons, including:

  • Incorrect web3provider configuration : do Sove you set the correct () and Propranty Initial Implementation.

  • Problems of synchronization of the metamark wallet : The wings Metasc and may not be properly synchronized with the blocked wall, which leads to the listing of the Onne account.

  • Web3provider settings

    : their assurance that web3provider is configured to use a supplier or Wrets differentiation.

Solution:

To solve this problem, follow these steps:

Metamask: Only one account is listed by the configured Web3Provider

Step 1:

The verification of theInitprovider ()is the prophecy on initialization with both metamark suppliers:

Javacrpt

Initprovider () {

Const Etherum = window ['Ethereum'];

Const Metask = window ['messk'];

// check both supplier instances

If (Ethereum && Metask) {

This.Provider = {

Type: "Web3",

Options: {

Repair: Etherum,

},

};

// Interpiea Web3Provid's interaction

This.web3provider = New Web3 (this.Provider);

} otherwise

console.error ('a single account is listed by web3provider configured');

}

}

Re

Step 2: Check the synchronization of metamark wrecks

Check if it is Metask Watlets is correctly synchronized with the local wall:

Javacrpt

// initially the supplier Metask

Const MetaskProvider = window ['messk'];

IF (MetmaskProvider) {

// set a Lister for Blockchain Ethereum events

Metamarkprovider.on ('chainready', () => {

// Your Local Ethereum Waller is correctly synchronized.

Console.log ("Your Local Ethereum wallet has been synchronized.");

});

// Initially the web3provider court with Metask

This.Provider = New Web3 (MetaskProvider);

}

Re

Step 3: Configure Web3Provider

Ensure that you set the correct function ()and propose addicts derivative:

`Javacrpt

Initprovider () {

Const Etherum = window ['Ethereum'];

Const Metask = window ['messk'];

// check both supplier instances

If (Ethereum && Metask) {

This.Provider = {

Type: "Web3",

Options: {

Repair: Etherum,

},

};

// Initially the web3provider court with Metask

This.web3provider = New Web3 (this.Provider);

} otherwise

console.error ('a single account is listed by web3provider configured');

}

}

` Re

Conclusion

Following these steps, you will be to withdraw to withdraw that both Etherum and Metask suppliers are configured suppliers. Remember to check the synchronization of the wings and configure correct the web3provider configurations for the optimal integration of ETERS.JS with Metask.

If the problem persists, do not hesitate to offer more detailed or more searches!

Ethereum Does Change Transaction

Leave a Reply

Your email address will not be published. Required fields are marked *

Get in touch

Give us a call or fill in the form below and we will contact you. We endeavor to answer all inquiries within 24 hours on business days.