Problem getting account's balance on Microsoft Edge

Hi, I’m using Metamask RPC API to get an address’ balance. Everything works good using Firefox, but if I try it on Microsoft Edge here’s what I get:

MetaMask - RPC Error: missing value for required argument 1 {code: -32602, message: 'missing value for required argument 1'}

Here’s my code:

ethereum
        .request({
            method: 'eth_getBalance',
            params: ["xxxxx"]
        })
        .then(async function(result) {
            
            console.log("RES: " + result);
            // 1 WEI = 1*10^-18 ETH
            let wei = parseInt(result);
            let bnb = wei / Math.pow(10, 18)

            document.getElementById("bnb").innerHTML = bnb;

        })
        .catch((err) => {

            console.log("Error");
            console.error(err);
        });

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.