WalletConnect / web3modal-vanilla-js-example

An example application how to use Web3modal from vanilla JavaScript
https://web3modal.com/
173 stars 147 forks source link

Can't pop up qr code #14

Open Macha-orange opened 3 years ago

Macha-orange commented 3 years ago

Hello,

There is an error when trying to pop the qr-code :

Uncaught (in promise) Error: Please pass numbers as strings or BN objects to avoid precision errors.
    fromWei index.js:248
    rowResolvers example.js:112

XHRPOSThttps://mainnet.infura.io/v3/8043bb2cf99347b1bfadfb233c5325c0 [HTTP/2 403 Forbidden 101ms]
(repeat every seconds)

Error at example.js :


var fromWei = function(number, unit) {
    unit = getUnitValue(unit);

    if(!utils.isBN(number) && !_.isString(number)) {
        **throw new Error('Please pass numbers as strings or BN objects to avoid precision errors.');** <---HERE
    }

    return utils.isBN(number) ? ethjsUnit.fromWei(number, unit) : ethjsUnit.fromWei(number, unit).toString(10);
};
Macha-orange commented 3 years ago

Is there just a problem with infura node ? It's a 403 forbidden error. Can I use my infura node point ?