Skip to content

Commit

Permalink
fix onboarding issue (#4259)
Browse files Browse the repository at this point in the history
  • Loading branch information
wentokay authored Jun 30, 2023
1 parent 5de03ce commit 92ef546
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions packages/secure-background/src/store/SecureStore.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import type {
Blockchain, BlockchainKeyringJson,
Blockchain,
BlockchainKeyringJson,
DeprecatedWalletDataDoNotUse,
Preferences } from "@coral-xyz/common";
Preferences,
} from "@coral-xyz/common";

import type { SecretPayload } from "./keyring/crypto";
import { decrypt, encrypt } from "./keyring/crypto";
Expand Down Expand Up @@ -98,10 +100,7 @@ export class SecureStore {
}

async setIsCold(publicKey: string, isCold?: boolean) {
let keynames = await this.db.get(KEY_IS_COLD_STORE);
if (!keynames) {
keynames = {};
}
const keynames = (await this.db.get(KEY_IS_COLD_STORE)) || {};
keynames[publicKey] = isCold;
await this.db.set(KEY_IS_COLD_STORE, keynames);
}
Expand All @@ -113,7 +112,7 @@ export class SecureStore {
}

async setKeyname(publicKey: string, name: string, blockchain: Blockchain) {
let keynames = await this.db.get(KEY_KEYNAME_STORE);
const keynames = (await this.db.get(KEY_KEYNAME_STORE)) || {};
if (!keynames[blockchain]) {
keynames[blockchain] = {};
}
Expand Down

1 comment on commit 92ef546

@vercel
Copy link

@vercel vercel bot commented on 92ef546 Jun 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.