Skip to content

Commit 82e548f

Browse files
refactor(express): operationId lightningWithdraw
TICKET: WCI-63
1 parent eb28af8 commit 82e548f

4 files changed

Lines changed: 4 additions & 7 deletions

File tree

modules/express/src/clientRoutes.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1843,10 +1843,7 @@ export function setupAPIRoutes(app: express.Application, config: Config): void {
18431843
]);
18441844

18451845
// lightning - onchain withdrawal
1846-
router.post('express.v2.wallet.lightningWithdraw', [
1847-
prepareBitGo(config),
1848-
typedPromiseWrapper(handleLightningWithdraw),
1849-
]);
1846+
router.post('express.lightningwithdrawonchain', [prepareBitGo(config), typedPromiseWrapper(handleLightningWithdraw)]);
18501847

18511848
// any other API v2 call
18521849
app.use('/api/v2/user/*', parseBody, prepareBitGo(config), promiseWrapper(handleV2UserREST));

modules/express/src/lightning/lightningWithdrawRoutes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ApiResponseError } from '../errors';
44
import { ExpressApiRouteRequest } from '../typedRoutes/api';
55

66
export async function handleLightningWithdraw(
7-
req: ExpressApiRouteRequest<'express.v2.wallet.lightningWithdraw', 'post'>
7+
req: ExpressApiRouteRequest<'express.lightningwithdrawonchain', 'post'>
88
): Promise<any> {
99
const bitgo = req.bitgo;
1010
const params = decodeOrElse(

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ export const ExpressLightningUnlockWalletApiSpec = apiSpec({
246246
});
247247

248248
export const ExpressLightningWalletWithdrawApiSpec = apiSpec({
249-
'express.v2.wallet.lightningWithdraw': {
249+
'express.lightningwithdrawonchain': {
250250
post: PostLightningWalletWithdraw,
251251
},
252252
});

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export const LightningWithdrawResponseType = {
201201
/**
202202
* Withdraw onchain balance from a lightning wallet to a regular onchain address.
203203
*
204-
* @operationId express.v2.wallet.lightningWithdraw
204+
* @operationId express.lightningwithdrawonchain
205205
* @tag Express
206206
*/
207207
export const PostLightningWalletWithdraw = httpRoute({

0 commit comments

Comments
 (0)