feat: namespaced keychain (#428)

* feat: namespaced keychain

* fix: update device interface

* fix: update WebApplication

* chore(deps): update snjs

* fix: Bridge interface

* chore(deps): update snjs

Co-authored-by: Johnny Almonte <johnny243@users.noreply.github.com>
This commit is contained in:
Johnny A
2020-09-03 05:19:21 -07:00
committed by GitHub
parent 57aa942c91
commit 568fb14f3a
5 changed files with 36 additions and 14 deletions

View File

@@ -8,12 +8,14 @@ export interface Bridge {
const KEYCHAIN_STORAGE_KEY = 'keychain';
export class BrowserBridge implements Bridge {
async getKeychainValue(): Promise<unknown> {
const value = localStorage.getItem(KEYCHAIN_STORAGE_KEY);
if (value) {
return JSON.parse(value);
}
}
async setKeychainValue(value: any): Promise<void> {
localStorage.setItem(KEYCHAIN_STORAGE_KEY, JSON.stringify(value));
}