Skip to content

Commit

Permalink
Merge try/catch blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
iamacook committed Mar 11, 2024
1 parent d8cd3af commit c3d6cff
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/routes/recovery/guards/disable-recovery-alerts.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,16 @@ export class DisableRecoveryAlertsGuard implements CanActivate {
const message = `${DisableRecoveryAlertsGuard.ACTION_PREFIX}-${chainId}-${safeAddress}-${moduleAddress}-${signer}-${timestamp}`;

try {
await verifyMessage({
const isValid = await verifyMessage({
address: signer,
message,
signature,
});
} catch (e) {
this.loggingService.debug(e);
return false;
}

try {
if (!isValid) {
return false;
}

const { safes } = await this.safeRepository.getSafesByModule({
chainId,
moduleAddress,
Expand Down

0 comments on commit c3d6cff

Please sign in to comment.