Skip to content

Commit fd890b6

Browse files
Merge pull request #8568 from BitGo/WCI-201_opertionId
refactor(express): operationId ConsolidateUnspentsV2
2 parents 6cfa1b6 + 56ce038 commit fd890b6

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

modules/express/src/clientRoutes.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -773,9 +773,7 @@ async function handleV2RecoverToken(req: ExpressApiRouteRequest<'express.wallet.
773773
* handle wallet fanout unspents
774774
* @param req
775775
*/
776-
async function handleV2ConsolidateUnspents(
777-
req: ExpressApiRouteRequest<'express.v2.wallet.consolidateunspents', 'post'>
778-
) {
776+
async function handleV2ConsolidateUnspents(req: ExpressApiRouteRequest<'express.wallet.consolidateunspents', 'post'>) {
779777
const bitgo = req.bitgo;
780778
const coin = bitgo.coin(req.decoded.coin);
781779
const wallet = await coin.wallets().get({ id: req.decoded.id });
@@ -1801,7 +1799,7 @@ export function setupAPIRoutes(app: express.Application, config: Config): void {
18011799
router.post('express.v2.wallet.enableTokens', [prepareBitGo(config), typedPromiseWrapper(handleV2EnableTokens)]);
18021800

18031801
// unspent changes
1804-
router.post('express.v2.wallet.consolidateunspents', [
1802+
router.post('express.wallet.consolidateunspents', [
18051803
prepareBitGo(config),
18061804
typedPromiseWrapper(handleV2ConsolidateUnspents),
18071805
]);

modules/express/src/typedRoutes/api/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export const ExpressWalletConsolidateUnspentsApiSpec = apiSpec({
165165
'express.v1.wallet.consolidateunspents': {
166166
put: PutConsolidateUnspents,
167167
},
168-
'express.v2.wallet.consolidateunspents': {
168+
'express.wallet.consolidateunspents': {
169169
post: PostConsolidateUnspents,
170170
},
171171
});

modules/express/src/typedRoutes/api/v2/consolidateunspents.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export const ConsolidateUnspentsResponse = t.union([
100100
/**
101101
* Builds, signs, and sends a transaction to consolidate unspents all in 1 call. Consolidating unspents is only for UTXO-based assets.
102102
*
103-
* @operationId express.v2.wallet.consolidateunspents
103+
* @operationId express.wallet.consolidateunspents
104104
* @tag Express
105105
*/
106106
export const PostConsolidateUnspents = httpRoute({

0 commit comments

Comments
 (0)