Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
Revert "fix(wallet): add delay to address and utxo calls"
Browse files Browse the repository at this point in the history
This reverts commit d9774c1.
  • Loading branch information
waldenraines committed Oct 27, 2023
1 parent dc1c728 commit c4fa51d
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/block_explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
);
Expand All @@ -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)
);
Expand Down

0 comments on commit c4fa51d

Please sign in to comment.