From 73453fab419d44f0b49faa089673f5d671a34f80 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 24 Apr 2024 17:16:34 +0200 Subject: [PATCH] fix: Remove tx inputs sorting by index (#1444) --- client/src/helpers/stardust/transactionsHelper.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/src/helpers/stardust/transactionsHelper.ts b/client/src/helpers/stardust/transactionsHelper.ts index 2419c8bdf..aa8ec1ec3 100644 --- a/client/src/helpers/stardust/transactionsHelper.ts +++ b/client/src/helpers/stardust/transactionsHelper.ts @@ -178,8 +178,7 @@ export class TransactionsHelper { } sortedOutputs = [...outputs, ...remainderOutputs]; - this.sortInputsAndOuputsByIndex(sortedOutputs); - this.sortInputsAndOuputsByIndex(inputs); + this.sortOuputsByIndex(sortedOutputs); } return { inputs, unlocks, outputs: sortedOutputs, unlockAddresses, transferTotal }; @@ -189,7 +188,7 @@ export class TransactionsHelper { * Sort inputs and outputs in assending order by index. * @param items Inputs or Outputs. */ - public static sortInputsAndOuputsByIndex(items: IInput[] | IOutput[]) { + public static sortOuputsByIndex(items: IOutput[]) { // eslint-disable-next-line @typescript-eslint/no-explicit-any items.sort((a: any, b: any) => { const firstIndex: string = a.id ? a.id.slice(-4) : a.outputId.slice(-4);