@umbra-privacy/sdk 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +9 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1203,6 +1203,7 @@ function getClaimableUtxoScannerFunction(args, deps) {
|
|
|
1203
1203
|
error instanceof Error ? error : void 0
|
|
1204
1204
|
);
|
|
1205
1205
|
}
|
|
1206
|
+
const treeUtxos = [];
|
|
1206
1207
|
for (const [, utxo] of result.items) {
|
|
1207
1208
|
if (utxo.treeIndex !== treeIndex) {
|
|
1208
1209
|
continue;
|
|
@@ -1210,12 +1211,14 @@ function getClaimableUtxoScannerFunction(args, deps) {
|
|
|
1210
1211
|
if (lastSeenInsertionIndex === null || utxo.insertionIndex > lastSeenInsertionIndex) {
|
|
1211
1212
|
lastSeenInsertionIndex = utxo.insertionIndex;
|
|
1212
1213
|
}
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
x25519GetSharedSecret
|
|
1218
|
-
)
|
|
1214
|
+
treeUtxos.push(utxo);
|
|
1215
|
+
}
|
|
1216
|
+
const decryptedResults = await Promise.all(
|
|
1217
|
+
treeUtxos.map(
|
|
1218
|
+
(utxo) => tryDecryptUtxo(utxo, clientX25519PrivateKey, aesDecryptor, x25519GetSharedSecret)
|
|
1219
|
+
)
|
|
1220
|
+
);
|
|
1221
|
+
for (const decrypted of decryptedResults) {
|
|
1219
1222
|
if (decrypted !== null) {
|
|
1220
1223
|
allDecrypted.push(decrypted);
|
|
1221
1224
|
}
|