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

Commit

Permalink
Merge pull request #1968 from LiskHQ/1966-transactions-API-ignore-oth…
Browse files Browse the repository at this point in the history
…er-params-when-transactionID-is-passed

Transactions API ignore other params when transactionID is passed
  • Loading branch information
sameersubudhi authored Dec 5, 2023
2 parents 27c7b40 + 0631b3d commit fb5a15c
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ const normalizeTransactions = async txs => {
return normalizedTransactions;
};

const getTransactionByID = async id => {
const response = await requestConnector('getTransactionByID', { id });
return normalizeTransaction(response);
};

const getTransactionsByIDs = async ids => {
const response = await requestConnector('getTransactionsByIDs', { ids });
return normalizeTransactions(response);
Expand Down Expand Up @@ -147,11 +142,6 @@ const getTransactions = async params => {
await getTransactionsByIDs(params.ids.slice(i * BATCH_SIZE, (i + 1) * BATCH_SIZE)),
);
}
} else if (params.id) {
transactions.data.push(await getTransactionByID(params.id));
if ('offset' in params && params.limit) {
transactions.data = transactions.data.slice(params.offset, params.offset + params.limit);
}
}

transactions.data = await BluebirdPromise.map(
Expand Down

0 comments on commit fb5a15c

Please sign in to comment.