add try catch

This commit is contained in:
Roman Storm 2019-12-03 10:03:14 -08:00
parent 89341b362e
commit 359ef927ab

@ -64,7 +64,12 @@ class Fetcher {
}
}
async fetchNonce() {
try {
config.nonce = await this.web3.eth.getTransactionCount(this.web3.eth.defaultAccount)
} catch(e) {
console.error('fetchNonce failed', e.message)
setTimeout(this.fetchNonce, 3000)
}
}
}