Skip to content

Commit 9802de7

Browse files
authored
Merge pull request #5825 from BitGo/BTC-1946
feat(express): add includeBalance option when fetching lightning wallets
2 parents a6d5a59 + 832aa59 commit 9802de7

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

modules/express/src/lightning/lightningSignerRoutes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export async function handleInitLightningWallet(req: express.Request): Promise<u
8484
}
8585
);
8686

87-
const wallet = await coin.wallets().get({ id: walletId });
87+
const wallet = await coin.wallets().get({ id: walletId, includeBalance: false });
8888
if (wallet.subType() !== 'lightningSelfCustody') {
8989
throw new ApiResponseError(`not a self custodial lighting wallet ${walletId}`, 400);
9090
}
@@ -145,7 +145,7 @@ export async function handleCreateSignerMacaroon(req: express.Request): Promise<
145145
}
146146
);
147147

148-
const wallet = await coin.wallets().get({ id: walletId });
148+
const wallet = await coin.wallets().get({ id: walletId, includeBalance: false });
149149
if (wallet.subType() !== 'lightningSelfCustody') {
150150
throw new ApiResponseError(`not a self custodial lighting wallet ${walletId}`, 400);
151151
}

modules/express/src/lightning/lightningWalletRoutes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export async function handleUpdateLightningWalletCoinSpecific(req: express.Reque
1717
);
1818

1919
const coin = bitgo.coin(req.params.coin);
20-
const wallet = await coin.wallets().get({ id: req.params.id });
20+
const wallet = await coin.wallets().get({ id: req.params.id, includeBalance: false });
2121

2222
return await updateWalletCoinSpecific(wallet, params);
2323
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export interface GetWalletOptions {
2323
allTokens?: boolean;
2424
reqId?: IRequestTracer;
2525
id?: string;
26+
includeBalance?: boolean;
2627
}
2728

2829
export interface GenerateBaseMpcWalletOptions {

0 commit comments

Comments
 (0)