promisify data

This commit is contained in:
fyears
2021-11-03 00:15:23 +08:00
parent cef623f493
commit 6431182ec3
3 changed files with 28 additions and 23 deletions
+2 -2
View File
@@ -62,7 +62,7 @@ export const ensembleMixedStates = async (
const remoteEncryptedKey = entry.Key;
let key = remoteEncryptedKey;
if (password !== "") {
key = decryptBase32ToString(remoteEncryptedKey, password);
key = await decryptBase32ToString(remoteEncryptedKey, password);
}
const backwardMapping = await getSyncMetaMappingByRemoteKeyS3(
db,
@@ -299,7 +299,7 @@ export const doActualSync = async (
if (password !== "") {
remoteEncryptedKey = state.remote_encrypted_key;
if (remoteEncryptedKey === undefined || remoteEncryptedKey === "") {
remoteEncryptedKey = encryptStringToBase32(key, password);
remoteEncryptedKey = await encryptStringToBase32(key, password);
}
}