Skip to content

Commit

Permalink
fixup! refactor: increase readability
Browse files Browse the repository at this point in the history
  • Loading branch information
iccicci committed Nov 19, 2024
1 parent 8f53486 commit d7c1eb5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ const fetchTxWithUtxo = async (txHash: string, address: string) => {
};

export const txIdsToTransactions = async (
txidsPerAddress: {
txIdsPerAddress: {
address: string;
txIds: string[];
}[],
): Promise<Types.TxIdsToTransactionsResponse[]> => {
if (txidsPerAddress.length === 0) return [];
if (txIdsPerAddress.length === 0) return [];

const promises: Promise<Types.TxIdsToTransactionsResponse | undefined>[] = [];

for (const item of txidsPerAddress) {
for (const item of txIdsPerAddress) {
for (const txId of item.txIds) {
promises.push(
pLimiter.add(() => fetchTxWithUtxo(txId, item.address), { throwOnTimeout: true }),
Expand Down

0 comments on commit d7c1eb5

Please sign in to comment.