Skip to content

Commit 852178c

Browse files
committed
fix: Improve receipt matching in transaction depth calculation
1 parent 3c819b5 commit 852178c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/app/src/systems/Transaction/utils/simplifyTransaction.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,14 @@ function getOperationDepth(
126126
) {
127127
let depth = 0;
128128

129-
const receiptIndex = parsedReceipts.findIndex(
130-
(r) => r.data.id === operation.receipts[0].id
129+
// biome-ignore lint/suspicious/noExplicitAny: Type mismatch, id is sometimes available.
130+
const receiptIndex = parsedReceipts.findIndex((r: any) =>
131+
operation.receipts?.some(
132+
// biome-ignore lint/suspicious/noExplicitAny: Type mismatch, id is sometimes available.
133+
(operationReceipt: any) => operationReceipt.id === r.data.id
134+
)
131135
);
136+
132137
if (receiptIndex !== -1) {
133138
depth = parsedReceipts[receiptIndex].indent;
134139
}

0 commit comments

Comments
 (0)