From dddc721e197241c601c5fdb3eaf615416f1f28dd Mon Sep 17 00:00:00 2001 From: Ravi Hegde Date: Mon, 10 Nov 2025 14:22:28 +0530 Subject: [PATCH] fix: this._type handling for send type with enum val 0 Ticket: COIN-6381-follow-up --- modules/sdk-coin-canton/src/lib/transaction/transaction.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/sdk-coin-canton/src/lib/transaction/transaction.ts b/modules/sdk-coin-canton/src/lib/transaction/transaction.ts index 384cbc889b..13e7ad7d5d 100644 --- a/modules/sdk-coin-canton/src/lib/transaction/transaction.ts +++ b/modules/sdk-coin-canton/src/lib/transaction/transaction.ts @@ -69,7 +69,7 @@ export class Transaction extends BaseTransaction { } toBroadcastFormat(): string { - if (!this._type) { + if (this._type === undefined) { throw new InvalidTransactionError('Transaction type is not set'); } if (this._type === TransactionType.TransferAcknowledge) { @@ -89,7 +89,7 @@ export class Transaction extends BaseTransaction { const partySignatures: PartySignature[] = []; const data: TransactionBroadcastData = { prepareCommandResponse: this._prepareCommand, - txType: this._type ? TransactionType[this._type] : '', + txType: this._type !== undefined ? TransactionType[this._type] : '', preparedTransaction: '', partySignatures: { signatures: partySignatures,