@permissionless-technologies/upp-sdk 0.4.20 → 0.4.21

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.
@@ -1710,7 +1710,7 @@ function usePoolTransfer(config) {
1710
1710
  const recipientNote = await createNoteForSelf(amount, origin, token);
1711
1711
  const changeNote = await createNoteForSelf(changeAmount, origin, token);
1712
1712
  const [transferModule, proofModule, aspModule] = await Promise.all([
1713
- import('../transfer-U5NRG5ZX.js'),
1713
+ import('../transfer-FWCRUWWM.js'),
1714
1714
  import('../proof-XQG5DN5N.js'),
1715
1715
  import('../asp-72WUGTQE.js')
1716
1716
  ]);
@@ -1867,7 +1867,7 @@ function useWithdraw(config) {
1867
1867
  const token = BigInt(selectedNote.token);
1868
1868
  setStage("creating_outputs");
1869
1869
  const [transferModule, proofModule, sdk] = await Promise.all([
1870
- import('../transfer-U5NRG5ZX.js'),
1870
+ import('../transfer-FWCRUWWM.js'),
1871
1871
  import('../proof-XQG5DN5N.js'),
1872
1872
  import('../index.js')
1873
1873
  ]);
@@ -2244,7 +2244,7 @@ function useSwap(config) {
2244
2244
  }
2245
2245
  setStage("creating_outputs");
2246
2246
  const [transferModule, proofModule, sdk, aspModule] = await Promise.all([
2247
- import('../transfer-U5NRG5ZX.js'),
2247
+ import('../transfer-FWCRUWWM.js'),
2248
2248
  import('../proof-XQG5DN5N.js'),
2249
2249
  import('../index.js'),
2250
2250
  import('../asp-72WUGTQE.js')
@@ -2391,7 +2391,7 @@ function useSwap(config) {
2391
2391
  }
2392
2392
  setStage("creating_outputs");
2393
2393
  const [transferModule, proofModule, sdk, aspModule] = await Promise.all([
2394
- import('../transfer-U5NRG5ZX.js'),
2394
+ import('../transfer-FWCRUWWM.js'),
2395
2395
  import('../proof-XQG5DN5N.js'),
2396
2396
  import('../index.js'),
2397
2397
  import('../asp-72WUGTQE.js')
@@ -2628,7 +2628,7 @@ function useSwap(config) {
2628
2628
  createNoteForSelf(changeAmount, origin, token)
2629
2629
  ]);
2630
2630
  const [transferModule, proofModule, aspModule] = await Promise.all([
2631
- import('../transfer-U5NRG5ZX.js'),
2631
+ import('../transfer-FWCRUWWM.js'),
2632
2632
  import('../proof-XQG5DN5N.js'),
2633
2633
  import('../asp-72WUGTQE.js')
2634
2634
  ]);
@@ -2743,20 +2743,20 @@ function useSwap(config) {
2743
2743
  };
2744
2744
  }
2745
2745
  function useProofWorker(worker) {
2746
- const managerRef = useRef(null);
2746
+ const [manager, setManager] = useState(null);
2747
2747
  useEffect(() => {
2748
2748
  if (!worker) {
2749
- managerRef.current = null;
2749
+ setManager(null);
2750
2750
  return;
2751
2751
  }
2752
- const manager = new ProofWorkerManager(worker);
2753
- managerRef.current = manager;
2752
+ const m = new ProofWorkerManager(worker);
2753
+ setManager(m);
2754
2754
  return () => {
2755
- manager.terminate();
2756
- managerRef.current = null;
2755
+ m.terminate();
2756
+ setManager(null);
2757
2757
  };
2758
2758
  }, [worker]);
2759
- return managerRef.current;
2759
+ return manager;
2760
2760
  }
2761
2761
  function usePrivateBalance(config) {
2762
2762
  const { unspentNotes, syncNotes, isSyncing: isNoteSyncing } = useUPPAccount();