pickle clears the key, so slice it before calling so we can reuse for 4s

This commit is contained in:
Bruno Windels 2021-11-03 02:08:27 +01:00
parent 8a36eb4532
commit 80a98f04c7
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ class EncryptedDehydratedDevice {
const account = new this._olm.Account();
try {
const pickledAccount = this._dehydratedDevice.device_data.account;
account.unpickle(key.binaryKey, pickledAccount);
account.unpickle(key.binaryKey.slice(), pickledAccount);
return new DehydratedDevice(this._dehydratedDevice, account, key);
} catch (err) {
account.free();