From ecea22577e4b3588e2b0ca49d931f39a99c352f1 Mon Sep 17 00:00:00 2001 From: Dadam Rishikesh Reddy Date: Mon, 20 Apr 2026 12:42:43 +0530 Subject: [PATCH] refactor(express): update operationId walletSweepV2 TICKET: WCI-203 --- modules/express/src/clientRoutes.ts | 4 ++-- modules/express/src/typedRoutes/api/index.ts | 2 +- modules/express/src/typedRoutes/api/v2/walletSweep.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/express/src/clientRoutes.ts b/modules/express/src/clientRoutes.ts index 9b876303b5..831993e1a9 100755 --- a/modules/express/src/clientRoutes.ts +++ b/modules/express/src/clientRoutes.ts @@ -850,7 +850,7 @@ async function handleV2FanOutUnspents(req: ExpressApiRouteRequest<'express.walle * handle wallet sweep * @param req */ -async function handleV2Sweep(req: ExpressApiRouteRequest<'express.v2.wallet.sweep', 'post'>) { +async function handleV2Sweep(req: ExpressApiRouteRequest<'express.wallet.sweep', 'post'>) { const bitgo = req.bitgo; const coin = bitgo.coin(req.decoded.coin); const wallet = await coin.wallets().get({ id: req.decoded.id }); @@ -1807,7 +1807,7 @@ export function setupAPIRoutes(app: express.Application, config: Config): void { ]); router.post('express.wallet.fanoutunspents', [prepareBitGo(config), typedPromiseWrapper(handleV2FanOutUnspents)]); - router.post('express.v2.wallet.sweep', [prepareBitGo(config), typedPromiseWrapper(handleV2Sweep)]); + router.post('express.wallet.sweep', [prepareBitGo(config), typedPromiseWrapper(handleV2Sweep)]); // CPFP router.post('express.wallet.acceleratetx', [ diff --git a/modules/express/src/typedRoutes/api/index.ts b/modules/express/src/typedRoutes/api/index.ts index 6b08dff1ce..a659c44cfc 100644 --- a/modules/express/src/typedRoutes/api/index.ts +++ b/modules/express/src/typedRoutes/api/index.ts @@ -318,7 +318,7 @@ export const ExpressV2CanonicalAddressApiSpec = apiSpec({ }); export const ExpressV2WalletSweepApiSpec = apiSpec({ - 'express.v2.wallet.sweep': { + 'express.wallet.sweep': { post: PostWalletSweep, }, }); diff --git a/modules/express/src/typedRoutes/api/v2/walletSweep.ts b/modules/express/src/typedRoutes/api/v2/walletSweep.ts index 91f24d59c9..4225f23c84 100644 --- a/modules/express/src/typedRoutes/api/v2/walletSweep.ts +++ b/modules/express/src/typedRoutes/api/v2/walletSweep.ts @@ -52,7 +52,7 @@ export const WalletSweepBody = { /** * The sweep call spends the full balance of the wallet to the provided address. On UTXO coins, the sweep call will fail if the wallet has any unconfirmed funds, or if there are more unspents than can be sent with a single transaction. * - * @operationId express.v2.wallet.sweep + * @operationId express.wallet.sweep * @tag Express */ export const PostWalletSweep = httpRoute({