make IPC calls to get pickle key

pull/13846/head
Hubert Chathi 2020-05-28 14:25:54 -04:00
parent c68f35060a
commit fb62f6dfb4
1 changed files with 26 additions and 0 deletions

View File

@ -500,4 +500,30 @@ export default class ElectronPlatform extends VectorBasePlatform {
return handled;
}
async getPickleKey(userId: string, deviceId: string): Promise<string | null> {
try {
return await this._ipcCall('getPickleKey', userId, deviceId);
} catch (e) {
// if we can't connect to the password storage, assume there's no
// pickle key
return null;
}
}
async createPickleKey(userId: string, deviceId: string): Promise<string | null> {
try {
return await this._ipcCall('createPickleKey', userId, deviceId);
} catch (e) {
// if we can't connect to the password storage, assume there's no
// pickle key
return null;
}
}
async destroyPickleKey(userId: string, deviceId: string): Promise<void> {
try {
await this._ipcCall('destroyPickleKey', userId, deviceId);
} catch (e) {}
}
}