Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions modules/express/src/clientRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion modules/express/src/typedRoutes/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const ExpressVerifyAddressApiSpec = apiSpec({
});

export const ExpressVerifyCoinAddressApiSpec = apiSpec({
'express.verifycoinaddress': {
'express.verifycoinaddress1': {
post: PostVerifyCoinAddress,
},
});
Expand Down
2 changes: 1 addition & 1 deletion modules/express/src/typedRoutes/api/v2/verifyAddress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion modules/express/test/unit/typedRoutes/decode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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), {
Expand Down
Loading