You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the following code on both the local machine (dev server) and on the remote server (AWS Lightsail). When I'm developing locally everything works perfectly, but when the code runs on the remote server getBalance method ocasionally returns 0 (~3 out of 10 requests).
I added loggers to getResult and perform functions in json-rpc-provider.
Input to perform never changes (address and blocktag are always the same)
When a promise resolves to 0, output of getResult is Object {jsonrpc: "2.0", id: 42, result: "0x0"}
const testnet = true
const providerToken = '...'
const privateKey = '...'
const provider = new ethers.providers.InfuraProvider(testnet, providerToken)
const wallet = new ethers.Wallet(privateKey, provider )
wallet.getBalance()
.then(balance => { console.log(balance.toString() }) // logs 0 ocasionally (3 out of 10 requests)
Any idea what is going on?
The text was updated successfully, but these errors were encountered:
I'm using the following code on both the local machine (dev server) and on the remote server (AWS Lightsail). When I'm developing locally everything works perfectly, but when the code runs on the remote server
getBalance
method ocasionally returns 0 (~3 out of 10 requests).I added loggers to
getResult
andperform
functions injson-rpc-provider
.Input to
perform
never changes (address and blocktag are always the same)When a promise resolves to 0, output of
getResult
isObject {jsonrpc: "2.0", id: 42, result: "0x0"}
Any idea what is going on?
The text was updated successfully, but these errors were encountered: