Skip to content

Commit 1fba0e0

Browse files
committed
fix: Handle receipt type casting in transaction simplification
1 parent 7ff8c3f commit 1fba0e0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ function transformOperation(
7070
): SimplifiedOperation {
7171
const { from, to, assetsSent = [] } = operation;
7272

73-
const operationReceipt = operation.receipts?.[0];
73+
const operationReceipt = (operation as Operation & { receipts?: Receipt[] })
74+
.receipts?.[0]; // Needed while fuels types are not updated
75+
7476
const operationType = getOperationType(operation);
7577
const baseOperation = {
7678
type: operationType,

packages/docs/examples/sendTransaction/SendTransaction.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ export function SendTransaction() {
4545
console.log('Transaction ID', transactionId);
4646
/* sendTransaction:end */
4747

48-
setTransactionId(
49-
typeof transactionId === 'string' ? transactionId : transactionId.id
50-
);
48+
setTransactionId(transactionId);
5149
}
5250
);
5351

0 commit comments

Comments
 (0)