diff --git a/services/export/shared/helpers/transaction.js b/services/export/shared/helpers/transaction.js index ea0284438..bd48b6988 100644 --- a/services/export/shared/helpers/transaction.js +++ b/services/export/shared/helpers/transaction.js @@ -35,16 +35,13 @@ const normalizeTransactionAmount = (address, tx, currentChainID) => { return (sign * amount).toString(); } - const isReclaim = tx.moduleCommand === `${MODULE.LEGACY}:${COMMAND.RECLAIM_LSK}`; const isTokenTransfer = tx.moduleCommand === `${MODULE.TOKEN}:${COMMAND.TRANSFER}`; - const isSender = address === tx.sender.address; const isRecipient = isTokenTransfer && address === tx.params.recipientAddress; const isSelfTransfer = isTokenTransfer && tx.sender.address === tx.params.recipientAddress; const { isSelfTokenTransferCredit, isIncomingCrossChainTransferTransaction } = tx; const sign = - (isReclaim && isSender) || (isTokenTransfer && isRecipient && !isSelfTransfer) || (isTokenTransfer && isRecipient && isSelfTransfer && isSelfTokenTransferCredit) || isIncomingCrossChainTransferTransaction diff --git a/services/export/shared/transactionsExport.js b/services/export/shared/transactionsExport.js index 04c0e165a..746463fc3 100644 --- a/services/export/shared/transactionsExport.js +++ b/services/export/shared/transactionsExport.js @@ -58,6 +58,8 @@ const { } = require('./helpers/constants'); const { resolveChainIDs, + getBlocks, + getTransactions, getEvents, getAllBlocksInAsc, getAllTransactionsInAsc, @@ -565,7 +567,7 @@ const getEntriesByChronology = async (params, sortedBlocks, sortedTransactions, if (txInList) return txInList; // because transaction may not be available for validator custodial reward reduction in the sorted list - const [txFromIndexer] = (await requestIndexer('transactions', { id: transactionID })).data; + const [txFromIndexer] = (await getTransactions({ id: transactionID })).data; return txFromIndexer; })(); const block = await (async () => { @@ -574,7 +576,7 @@ const getEntriesByChronology = async (params, sortedBlocks, sortedTransactions, if (blockInList) return blockInList; // because block may not be available for validator custodial reward reduction in the sorted list - const [blockFromIndexer] = (await requestIndexer('blocks', { id: blockID })).data; + const [blockFromIndexer] = (await getBlocks({ id: blockID })).data; return blockFromIndexer; })();