File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
modules/sdk-core/src/bitgo/wallet Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 44 * Copyright 2025, BitGo, Inc. All Rights Reserved.
55 */
66import { BitGoAPI } from '@bitgo/sdk-api' ;
7- import { Tapt } from " @bitgo/sdk-coin-apt" ;
7+ import { Tapt } from ' @bitgo/sdk-coin-apt' ;
88require ( 'dotenv' ) . config ( { path : '../../../.env' } ) ;
99
1010const bitgo = new BitGoAPI ( {
Original file line number Diff line number Diff line change @@ -1175,6 +1175,13 @@ export class Wallet implements IWallet {
11751175 throw new Error ( 'limit argument must be between 1 and 500' ) ;
11761176 }
11771177
1178+ // Assert that either both nftCollectionId and nftId are provided or neither are provided
1179+ const hasNftCollectionId = ! _ . isUndefined ( query . nftCollectionId ) ;
1180+ const hasNftId = ! _ . isUndefined ( query . nftId ) ;
1181+ if ( hasNftCollectionId !== hasNftId ) {
1182+ throw new Error ( 'nftCollectionId and nftId must both be provided or both be omitted' ) ;
1183+ }
1184+
11781185 return this . bitgo
11791186 . get ( this . baseCoin . url ( '/wallet/' + this . _wallet . id + '/addresses/balances' ) )
11801187 . query ( query )
You can’t perform that action at this time.
0 commit comments