Skip to content

Commit

Permalink
Restore redundant conversion for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jryans committed Apr 7, 2020
1 parent 0efac7e commit 2e3cb54
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/crypto/verification/Base.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ export class VerificationBase extends EventEmitter {
`m.cross_signing.${type}`, [this.deviceId],
);
const result = await promise;
return decodeBase64(result);
const decoded = decodeBase64(result);
return Uint8Array.from(decoded);
} },
original._cacheCallbacks,
);
Expand Down Expand Up @@ -251,7 +252,9 @@ export class VerificationBase extends EventEmitter {
logger.info("Got key backup key, decoding...");
const decodedKey = decodeBase64(base64Key);
logger.info("Decoded backup key, storing...");
client._crypto.storeSessionBackupPrivateKey(decodedKey);
client._crypto.storeSessionBackupPrivateKey(
Uint8Array.from(decodedKey),
);
logger.info("Backup key stored. Starting backup restore...");
const backupInfo = await client.getKeyBackupVersion();
// no need to await for this - just let it go in the bg
Expand Down

0 comments on commit 2e3cb54

Please sign in to comment.