From c4fa51d9564043662a728d51c1e640503cfc8b28 Mon Sep 17 00:00:00 2001 From: Walden Raines Date: Fri, 27 Oct 2023 13:22:55 -0400 Subject: [PATCH] Revert "fix(wallet): add delay to address and utxo calls" This reverts commit d9774c1c7e28021a48efa30666c6ceb9e75cd1da. --- src/block_explorer.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/block_explorer.js b/src/block_explorer.js index 2e8f8be0..e51a04a7 100644 --- a/src/block_explorer.js +++ b/src/block_explorer.js @@ -2,11 +2,6 @@ import axios from "axios"; import BigNumber from "bignumber.js"; import { satoshisToBitcoins, blockExplorerAPIURL } from "unchained-bitcoin"; -// FIXME: hack -const delay = () => { - return new Promise((resolve) => setTimeout(resolve, 500)); -}; - /** * Fetch information for signing transactions from block explorer API * @param {string} address - The address from which to obtain the information @@ -22,9 +17,6 @@ export async function blockExplorerGetAddresesUTXOs(address, network) { return await Promise.all( utxos.map(async (utxo) => { // FIXME: inefficient, need to cache here by utxo.txid - // FIXME: delay hack to prevent throttling - await delay(); - const transactionResult = await axios.get( blockExplorerAPIURL(`/tx/${utxo.txid}/hex`, network) ); @@ -48,9 +40,6 @@ export async function blockExplorerGetAddresesUTXOs(address, network) { export async function blockExplorerGetAddressStatus(address, network) { try { - // FIXME: delay hack to prevent throttling - await delay(); - const addressesult = await axios.get( blockExplorerAPIURL(`/address/${address}`, network) );