Skip to content

Commit

Permalink
chore: doesn't init verify api in dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ganchoradkov committed Aug 27, 2024
1 parent e5e9f93 commit 7aea2db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/controllers/verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export class Verify extends IVerify {
}

public init = async () => {
if (this.isDevEnv) return;
this.publicKey = await this.store.getItem(this.storeKey);
if (this.publicKey && toMiliseconds(this.publicKey?.expiresAt) < Date.now()) {
this.logger.debug("verify v2 public key expired");
Expand All @@ -62,7 +63,7 @@ export class Verify extends IVerify {
};

public register: IVerify["register"] = async (params) => {
if (!isBrowser()) return;
if (!isBrowser() || this.isDevEnv) return;
const origin = window.location.origin;
const { id, decryptedId } = params;
const src = `${this.verifyUrlV3}/attestation?projectId=${this.core.projectId}&origin=${origin}&id=${id}&decryptedId=${decryptedId}`;
Expand Down

0 comments on commit 7aea2db

Please sign in to comment.