mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 10:13:31 +00:00
* [PM-3685] Remove ipcRenderer from renderer-storage * Break out storage and keytar into separate functions
20 lines
536 B
TypeScript
20 lines
536 B
TypeScript
import { AbstractStorageService } from "@bitwarden/common/platform/abstractions/storage.service";
|
|
|
|
export class ElectronRendererStorageService implements AbstractStorageService {
|
|
get<T>(key: string): Promise<T> {
|
|
return ipc.platform.storage.get(key);
|
|
}
|
|
|
|
has(key: string): Promise<boolean> {
|
|
return ipc.platform.storage.has(key);
|
|
}
|
|
|
|
save(key: string, obj: any): Promise<any> {
|
|
return ipc.platform.storage.save(key, obj);
|
|
}
|
|
|
|
remove(key: string): Promise<any> {
|
|
return ipc.platform.storage.remove(key);
|
|
}
|
|
}
|