Skip to content

Commit ade84e8

Browse files
Merge pull request #8377 from BitGo/CECHO-606
fix(sdk-coin-sol): use null check for decimalPlaces in token transfer builders
2 parents f823795 + 78ae27b commit ade84e8

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

modules/sdk-coin-sol/src/lib/tokenTransferBuilder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export class TokenTransferBuilder extends TransactionBuilder {
124124
let tokenName: string;
125125
let programId: string | undefined;
126126
let decimals: number | undefined;
127-
if (sendParams.tokenAddress && sendParams.programId && sendParams.decimalPlaces) {
127+
if (sendParams.tokenAddress && sendParams.programId && sendParams.decimalPlaces != null) {
128128
tokenAddress = sendParams.tokenAddress;
129129
tokenName = sendParams.tokenName;
130130
programId = sendParams.programId;

modules/sdk-coin-sol/src/lib/transferBuilderV2.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export class TransferBuilderV2 extends TransactionBuilder {
138138
let tokenName: string;
139139
let programId: string | undefined;
140140
let decimals: number | undefined;
141-
if (sendParams.tokenAddress && sendParams.programId && sendParams.decimalPlaces) {
141+
if (sendParams.tokenAddress && sendParams.programId && sendParams.decimalPlaces != null) {
142142
tokenName = sendParams.tokenName;
143143
tokenAddress = sendParams.tokenAddress;
144144
decimals = sendParams.decimalPlaces;

0 commit comments

Comments
 (0)