Skip to content

Commit e39c339

Browse files
authored
Merge pull request #7461 from BitGo/COIN-6381-follow-up
fix: this._type handling for send type with enum val 0
2 parents 758460f + dddc721 commit e39c339

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/sdk-coin-canton/src/lib/transaction/transaction.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class Transaction extends BaseTransaction {
6969
}
7070

7171
toBroadcastFormat(): string {
72-
if (!this._type) {
72+
if (this._type === undefined) {
7373
throw new InvalidTransactionError('Transaction type is not set');
7474
}
7575
if (this._type === TransactionType.TransferAcknowledge) {
@@ -89,7 +89,7 @@ export class Transaction extends BaseTransaction {
8989
const partySignatures: PartySignature[] = [];
9090
const data: TransactionBroadcastData = {
9191
prepareCommandResponse: this._prepareCommand,
92-
txType: this._type ? TransactionType[this._type] : '',
92+
txType: this._type !== undefined ? TransactionType[this._type] : '',
9393
preparedTransaction: '',
9494
partySignatures: {
9595
signatures: partySignatures,

0 commit comments

Comments
 (0)