Changing data in store to array

This commit is contained in:
DwCay
2022-07-06 19:27:26 +03:00
parent f0e0d9479d
commit 2d0ae35cc8
4 changed files with 11 additions and 9 deletions

View File

@@ -74,10 +74,10 @@ class Store {
};
encryptAccountData(data) {
return Object.keys(data).map((label) => {
let value = cryptography.encryptMessageWithPassphrase(cryptography.getRandomBytes(32).toString('hex') + ":" + this.accountData[label], this.passPhrase, this.pubKey);
return data.map((item) => {
let value = cryptography.encryptMessageWithPassphrase(cryptography.getRandomBytes(32).toString('hex') + ":" + item.value, this.passPhrase, this.pubKey);
return {
"label": label,
"label": item.key,
"value": value.encryptedMessage,
"value_nonce": value.nonce,
}