From f988d575003da9d1b0cdbc16624d6eac053574b8 Mon Sep 17 00:00:00 2001 From: Dadam Rishikesh Reddy Date: Wed, 22 Apr 2026 11:05:11 +0530 Subject: [PATCH] refactor(express): update operationId for verifyaddressV2 TICKET: WCI-224 --- modules/express/src/clientRoutes.ts | 6 ++++-- modules/express/src/typedRoutes/api/index.ts | 2 +- modules/express/src/typedRoutes/api/v2/verifyAddress.ts | 2 +- modules/express/test/unit/typedRoutes/decode.ts | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/express/src/clientRoutes.ts b/modules/express/src/clientRoutes.ts index 1e37097ec7..d1de160d2f 100755 --- a/modules/express/src/clientRoutes.ts +++ b/modules/express/src/clientRoutes.ts @@ -362,7 +362,9 @@ function handleV2UserREST(req: express.Request, res: express.Response, next: exp * handle v2 address validation * @param req */ -function handleV2VerifyAddress(req: ExpressApiRouteRequest<'express.verifycoinaddress', 'post'>): { isValid: boolean } { +function handleV2VerifyAddress(req: ExpressApiRouteRequest<'express.verifycoinaddress1', 'post'>): { + isValid: boolean; +} { const bitgo = req.bitgo; const coin = bitgo.coin(req.params.coin); @@ -1832,7 +1834,7 @@ export function setupAPIRoutes(app: express.Application, config: Config): void { // Miscellaneous router.post('express.canonicaladdress', [prepareBitGo(config), typedPromiseWrapper(handleCanonicalAddress)]); - router.post('express.verifycoinaddress', [prepareBitGo(config), typedPromiseWrapper(handleV2VerifyAddress)]); + router.post('express.verifycoinaddress1', [prepareBitGo(config), typedPromiseWrapper(handleV2VerifyAddress)]); router.put('express.pendingapprovals', [prepareBitGo(config), typedPromiseWrapper(handleV2PendingApproval)]); // lightning - pay invoice diff --git a/modules/express/src/typedRoutes/api/index.ts b/modules/express/src/typedRoutes/api/index.ts index 5c5290f028..7430a62664 100644 --- a/modules/express/src/typedRoutes/api/index.ts +++ b/modules/express/src/typedRoutes/api/index.ts @@ -103,7 +103,7 @@ export const ExpressVerifyAddressApiSpec = apiSpec({ }); export const ExpressVerifyCoinAddressApiSpec = apiSpec({ - 'express.verifycoinaddress': { + 'express.verifycoinaddress1': { post: PostVerifyCoinAddress, }, }); diff --git a/modules/express/src/typedRoutes/api/v2/verifyAddress.ts b/modules/express/src/typedRoutes/api/v2/verifyAddress.ts index c4ced59be2..bd12a1499b 100644 --- a/modules/express/src/typedRoutes/api/v2/verifyAddress.ts +++ b/modules/express/src/typedRoutes/api/v2/verifyAddress.ts @@ -28,7 +28,7 @@ export const VerifyAddressV2Body = { * Verify address for a given coin. * * - * @operationId express.verifycoinaddress + * @operationId express.verifycoinaddress1 * @tag Express */ export const PostVerifyCoinAddress = httpRoute({ diff --git a/modules/express/test/unit/typedRoutes/decode.ts b/modules/express/test/unit/typedRoutes/decode.ts index 3da635b4ce..cfad3a60a9 100644 --- a/modules/express/test/unit/typedRoutes/decode.ts +++ b/modules/express/test/unit/typedRoutes/decode.ts @@ -107,7 +107,7 @@ describe('io-ts decode tests', function () { address: 'some-address', }); }); - it('express.verifycoinaddress', function () { + it('express.verifycoinaddress1', function () { // invalid coin param type assert.throws(() => assertDecode(t.type(VerifyAddressV2Params), {