From 4d7973f635db19d2dc9a0bbe09e0f1ba2bf072d5 Mon Sep 17 00:00:00 2001 From: Ewan Sheldon Date: Mon, 25 Sep 2023 12:46:25 +0200 Subject: [PATCH] remove promise race --- src/transactions.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/transactions.js b/src/transactions.js index 7a9864c..d6b8fd2 100644 --- a/src/transactions.js +++ b/src/transactions.js @@ -23,17 +23,9 @@ let startBlock; let endBlock; let tokenDecs = {}; -const threeSecTimeout = _ => { - return new Promise((resolve, reject) => { - setTimeout(() => { - return reject(new Error('timeout')); - }, 10000); - }); -} - const retryableWithTimeout = async promise => { try { - return await Promise.race([promise, threeSecTimeout()]); + return await promise; } catch (e) { console.log(e) return await retryableWithTimeout(promise);