Skip to content

Commit eceae25

Browse files
committed
Updated verify-signatures middleware to handle testnet and mainnet
1 parent b64cc91 commit eceae25

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/common/http-signature/verify-signature.middleware.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export class VerifySignatureMiddleware implements NestMiddleware {
3131
}
3232

3333
async use(req: Request, res: Response, next: NextFunction): Promise<void> {
34-
if ('signature' in req.headers && !(await this.verifyRequest(req, res))) return;
34+
if (!(await this.verifyRequest(req, res))) return;
3535
next();
3636
}
3737
}

src/inbox/inbox.controller.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ export class InboxController {
2828
@ApiQuery({ name: 'type', description: 'Type of messages to get', required: false })
2929
@ApiProduces('application/json')
3030
async list(
31-
@Signer() signer: Account,
3231
@Param('address') address: string,
32+
@Signer() signer: Account,
3333
@Query('type') type?: string,
3434
): Promise<MessageSummery[]> {
3535
if (signer.address !== address) {

0 commit comments

Comments
 (0)