Skip to content

Commit 831c65f

Browse files
authored
Merge pull request #6034 from BitGo/BTC-2007-decorate-utxo
feat: add option to not decorate utxo transfers
2 parents c08f48c + 1d17680 commit 831c65f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

modules/sdk-core/src/bitgo/wallet/iWallet.ts

+1
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ export interface TransfersOptions extends PaginationOptions {
306306
includeHex?: boolean;
307307
state?: string[] | string;
308308
type?: string;
309+
decorateUtxoSpecificFields?: boolean;
309310
}
310311

311312
export interface GetTransferOptions {

modules/sdk-core/src/bitgo/wallet/wallet.ts

+7
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,13 @@ export class Wallet implements IWallet {
573573
query.type = params.type;
574574
}
575575

576+
if (!_.isNil(params.decorateUtxoSpecificFields)) {
577+
if (!_.isBoolean(params.decorateUtxoSpecificFields)) {
578+
throw new Error('invalid includeHex argument, expecting boolean');
579+
}
580+
query.decorateUtxoSpecificFields = params.decorateUtxoSpecificFields;
581+
}
582+
576583
return await this.bitgo.get(this.url('/transfer')).query(query).result();
577584
}
578585

0 commit comments

Comments
 (0)