privacycash 1.0.12 → 1.0.13

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/getUtxos.js CHANGED
@@ -148,19 +148,17 @@ async function fetchUserUtxos({ publicKey, connection, url, storage, encryptionS
148
148
  if (!data.hasMore) {
149
149
  if (cachedString) {
150
150
  let cachedEncryptedOutputs = JSON.parse(cachedString);
151
- for (let encryptedOutput of cachedEncryptedOutputs) {
152
- if (decryptionTaskFinished % 100 == 0) {
153
- logger.info(`(decrypting cached utxo: ${decryptionTaskFinished + 1}/${decryptionTaskTotal}...)`);
154
- }
155
- let batchRes = await decrypt_outputs(cachedEncryptedOutputs, encryptionService, utxoKeypair, lightWasm);
156
- decryptionTaskFinished += cachedEncryptedOutputs.length;
157
- logger.debug('cachedbatchReslen', batchRes.length, ' source', cachedEncryptedOutputs.length);
158
- for (let i = 0; i < batchRes.length; i++) {
159
- let dres = batchRes[i];
160
- if (dres.status == 'decrypted' && dres.utxo) {
161
- myUtxos.push(dres.utxo);
162
- myEncryptedOutputs.push(dres.encryptedOutput);
163
- }
151
+ if (decryptionTaskFinished % 100 == 0) {
152
+ logger.info(`(decrypting cached utxo: ${decryptionTaskFinished + 1}/${decryptionTaskTotal}...)`);
153
+ }
154
+ let batchRes = await decrypt_outputs(cachedEncryptedOutputs, encryptionService, utxoKeypair, lightWasm);
155
+ decryptionTaskFinished += cachedEncryptedOutputs.length;
156
+ logger.debug('cachedbatchReslen', batchRes.length, ' source', cachedEncryptedOutputs.length);
157
+ for (let i = 0; i < batchRes.length; i++) {
158
+ let dres = batchRes[i];
159
+ if (dres.status == 'decrypted' && dres.utxo) {
160
+ myUtxos.push(dres.utxo);
161
+ myEncryptedOutputs.push(dres.encryptedOutput);
164
162
  }
165
163
  }
166
164
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "privacycash",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "repository": "https://github.com/Privacy-Cash/privacy-cash-sdk",
package/src/getUtxos.ts CHANGED
@@ -191,19 +191,17 @@ async function fetchUserUtxos({ publicKey, connection, url, storage, encryptionS
191
191
  if (!data.hasMore) {
192
192
  if (cachedString) {
193
193
  let cachedEncryptedOutputs = JSON.parse(cachedString)
194
- for (let encryptedOutput of cachedEncryptedOutputs) {
195
- if (decryptionTaskFinished % 100 == 0) {
196
- logger.info(`(decrypting cached utxo: ${decryptionTaskFinished + 1}/${decryptionTaskTotal}...)`)
197
- }
198
- let batchRes = await decrypt_outputs(cachedEncryptedOutputs, encryptionService, utxoKeypair, lightWasm)
199
- decryptionTaskFinished += cachedEncryptedOutputs.length
200
- logger.debug('cachedbatchReslen', batchRes.length, ' source', cachedEncryptedOutputs.length)
201
- for (let i = 0; i < batchRes.length; i++) {
202
- let dres = batchRes[i]
203
- if (dres.status == 'decrypted' && dres.utxo) {
204
- myUtxos.push(dres.utxo)
205
- myEncryptedOutputs.push(dres.encryptedOutput!)
206
- }
194
+ if (decryptionTaskFinished % 100 == 0) {
195
+ logger.info(`(decrypting cached utxo: ${decryptionTaskFinished + 1}/${decryptionTaskTotal}...)`)
196
+ }
197
+ let batchRes = await decrypt_outputs(cachedEncryptedOutputs, encryptionService, utxoKeypair, lightWasm)
198
+ decryptionTaskFinished += cachedEncryptedOutputs.length
199
+ logger.debug('cachedbatchReslen', batchRes.length, ' source', cachedEncryptedOutputs.length)
200
+ for (let i = 0; i < batchRes.length; i++) {
201
+ let dres = batchRes[i]
202
+ if (dres.status == 'decrypted' && dres.utxo) {
203
+ myUtxos.push(dres.utxo)
204
+ myEncryptedOutputs.push(dres.encryptedOutput!)
207
205
  }
208
206
  }
209
207
  }