@permissionless-technologies/upp-sdk 0.5.4 → 0.5.5

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.
@@ -382,7 +382,7 @@ function UPPAccountProvider({
382
382
  (currentStore ? currentStore.getNotes() : notes).map((n) => n.commitment.toLowerCase())
383
383
  );
384
384
  const candidates = [];
385
- console.log("[syncNotes] Scanning contract:", contractAddress, "\u2014 existing:", existingCommitments.size, "notes");
385
+ console.log("[syncNotes] Scanning contract:", contractAddress, "\u2014 existing:", existingCommitments.size, "notes", "\u2014 store:", currentStore ? "ready" : "NULL");
386
386
  try {
387
387
  const shieldedLogs = await client.getLogs({
388
388
  address: contractAddress,
@@ -785,6 +785,9 @@ function UPPAccountProvider({
785
785
  }
786
786
  if (store && (discovered > 0 || repaired > 0)) {
787
787
  await store.persist();
788
+ console.log(`[syncNotes] Persisted ${store.getNotes().length} notes to IndexedDB`);
789
+ } else if (!store) {
790
+ console.warn("[syncNotes] No NoteStore \u2014 notes NOT persisted");
788
791
  }
789
792
  return discovered + repaired;
790
793
  } finally {
@@ -1714,7 +1717,7 @@ function usePoolTransfer(config) {
1714
1717
  const recipientNote = await createNoteForSelf(amount, origin, token);
1715
1718
  const changeNote = await createNoteForSelf(changeAmount, origin, token);
1716
1719
  const [transferModule, proofModule, aspModule] = await Promise.all([
1717
- import('../transfer-CKA4PU2C.js'),
1720
+ import('../transfer-BVZAMEJH.js'),
1718
1721
  import('../proof-YMXBL4D5.js'),
1719
1722
  import('../asp-72WUGTQE.js')
1720
1723
  ]);
@@ -1872,7 +1875,7 @@ function useWithdraw(config) {
1872
1875
  const token = BigInt(selectedNote.token);
1873
1876
  setStage("creating_outputs");
1874
1877
  const [transferModule, proofModule, sdk] = await Promise.all([
1875
- import('../transfer-CKA4PU2C.js'),
1878
+ import('../transfer-BVZAMEJH.js'),
1876
1879
  import('../proof-YMXBL4D5.js'),
1877
1880
  import('../index.js')
1878
1881
  ]);
@@ -2250,7 +2253,7 @@ function useSwap(config) {
2250
2253
  }
2251
2254
  setStage("creating_outputs");
2252
2255
  const [transferModule, proofModule, sdk, aspModule] = await Promise.all([
2253
- import('../transfer-CKA4PU2C.js'),
2256
+ import('../transfer-BVZAMEJH.js'),
2254
2257
  import('../proof-YMXBL4D5.js'),
2255
2258
  import('../index.js'),
2256
2259
  import('../asp-72WUGTQE.js')
@@ -2398,7 +2401,7 @@ function useSwap(config) {
2398
2401
  }
2399
2402
  setStage("creating_outputs");
2400
2403
  const [transferModule, proofModule, sdk, aspModule] = await Promise.all([
2401
- import('../transfer-CKA4PU2C.js'),
2404
+ import('../transfer-BVZAMEJH.js'),
2402
2405
  import('../proof-YMXBL4D5.js'),
2403
2406
  import('../index.js'),
2404
2407
  import('../asp-72WUGTQE.js')
@@ -2636,7 +2639,7 @@ function useSwap(config) {
2636
2639
  createNoteForSelf(changeAmount, origin, token)
2637
2640
  ]);
2638
2641
  const [transferModule, proofModule, aspModule] = await Promise.all([
2639
- import('../transfer-CKA4PU2C.js'),
2642
+ import('../transfer-BVZAMEJH.js'),
2640
2643
  import('../proof-YMXBL4D5.js'),
2641
2644
  import('../asp-72WUGTQE.js')
2642
2645
  ]);