From 80a98f04c7f5669868ba4292de1dded1dec4a489 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 3 Nov 2021 02:08:27 +0100 Subject: [PATCH] pickle clears the key, so slice it before calling so we can reuse for 4s --- src/matrix/e2ee/Dehydration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix/e2ee/Dehydration.js b/src/matrix/e2ee/Dehydration.js index 87cf0121..65e2b90a 100644 --- a/src/matrix/e2ee/Dehydration.js +++ b/src/matrix/e2ee/Dehydration.js @@ -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();