don't prefetch txns
This commit is contained in:
parent
f78674578b
commit
d9de65911b
@ -12,7 +12,7 @@ const provider = new WebSocketProvider(rpcUrl);
|
||||
const blockBaseFeePerGasObservable$ = new Observable<number>((observer) => {
|
||||
provider.on('block', async (blockNumber) => {
|
||||
try {
|
||||
const { baseFeePerGas } = await provider.getBlock(blockNumber, true) || {};
|
||||
const { baseFeePerGas } = await provider.getBlock(blockNumber) || {};
|
||||
|
||||
if (!baseFeePerGas) throw new Error(`Error fetching block! ${blockNumber}`);
|
||||
|
||||
|
@ -82,7 +82,11 @@ client.login(token)
|
||||
await redisClient.set('current-prices', JSON.stringify(averageGasPrices))
|
||||
await doAlerts(averageGasPrices);
|
||||
},
|
||||
error: console.error,
|
||||
error: (err) => console.error(err),
|
||||
complete: () => console.log("Blockchain data stream closed")
|
||||
})
|
||||
});
|
||||
})
|
||||
.catch(
|
||||
(err) => console.log(`Bot runtime error!
|
||||
${err}`)
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user