Skip to content

Commit b184c0b

Browse files
committed
fix(cardano-services): use correct inputs and collaterals order while providing transactions
1 parent b276865 commit b184c0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/cardano-services/src/ChainHistory/DbSyncChainHistory/DbSyncChainHistoryProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ export class DbSyncChainHistoryProvider extends DbSyncProvider() implements Chai
136136

137137
return txResults.rows.map((tx) => {
138138
const txId = tx.id.toString('hex') as unknown as Cardano.TransactionId;
139-
const txInputs = orderBy(inputs.filter((input) => input.txInputId === txId).map(mapTxIn), ['index']);
140-
const txCollaterals = orderBy(collaterals.filter((col) => col.txInputId === txId).map(mapTxIn), ['index']);
139+
const txInputs = inputs.filter((input) => input.txInputId === txId).map(mapTxIn);
140+
const txCollaterals = collaterals.filter((col) => col.txInputId === txId).map(mapTxIn);
141141
const txOutputs = orderBy(outputs.filter((output) => output.txId === txId).map(mapTxOut), ['index']);
142142
const txCollateralOutputs = orderBy(collateralOutputs.filter((output) => output.txId === txId).map(mapTxOut), [
143143
'index'

0 commit comments

Comments
 (0)