Skip to content

Commit

Permalink
fix: pubkey prompt even after reasonable preset set
Browse files Browse the repository at this point in the history
  • Loading branch information
pavanjoshi914 committed Sep 3, 2024
1 parent 97fd319 commit e6cb408
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import db from "~/extension/background-script/db";
import state from "~/extension/background-script/state";

function delay(ms: number) {
return new Promise((resolve) => setTimeout(resolve, ms));
}

export async function hasPermissionFor(method: string, host: string) {
if (!host) {
return false;
Expand All @@ -21,6 +25,8 @@ export async function hasPermissionFor(method: string, host: string) {
throw new Error("Account doesn't exist");
}

await delay(1000);

const findPermission = await db.permissions.get({
host,
method,
Expand Down

0 comments on commit e6cb408

Please sign in to comment.