@rozoai/intent-pay 0.0.35 → 0.0.36-beta.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.
Files changed (46) hide show
  1. package/build/assets/chains.d.ts +14 -1
  2. package/build/hooks/useDaimoPay.d.ts +7 -2
  3. package/build/hooks/usePaymentState.d.ts +2 -0
  4. package/build/hooks/useSolanaPaymentOptions.d.ts +1 -1
  5. package/build/hooks/useStellarPaymentOptions.d.ts +1 -1
  6. package/build/hooks/useWalletPaymentOptions.d.ts +1 -18
  7. package/build/package.json.js +2 -2
  8. package/build/provider/StellarContextProvider.d.ts +9 -0
  9. package/build/src/components/Common/Modal/index.js +16 -2
  10. package/build/src/components/Common/Modal/index.js.map +1 -1
  11. package/build/src/components/DaimoPayButton/index.js +12 -15
  12. package/build/src/components/DaimoPayButton/index.js.map +1 -1
  13. package/build/src/components/Pages/Confirmation/index.js +2 -4
  14. package/build/src/components/Pages/Confirmation/index.js.map +1 -1
  15. package/build/src/components/Pages/Connectors/index.js +2 -2
  16. package/build/src/components/Pages/Connectors/index.js.map +1 -1
  17. package/build/src/components/Pages/PayWithToken/index.js +63 -48
  18. package/build/src/components/Pages/PayWithToken/index.js.map +1 -1
  19. package/build/src/components/Pages/Solana/PayWithSolanaToken/index.js +68 -34
  20. package/build/src/components/Pages/Solana/PayWithSolanaToken/index.js.map +1 -1
  21. package/build/src/components/Pages/Stellar/PayWithStellarToken/index.js +44 -21
  22. package/build/src/components/Pages/Stellar/PayWithStellarToken/index.js.map +1 -1
  23. package/build/src/components/Pages/WaitingDepositAddress/index.js +3 -2
  24. package/build/src/components/Pages/WaitingDepositAddress/index.js.map +1 -1
  25. package/build/src/constants/rozoConfig.js +3 -3
  26. package/build/src/constants/rozoConfig.js.map +1 -1
  27. package/build/src/hooks/useDaimoPay.js +37 -3
  28. package/build/src/hooks/useDaimoPay.js.map +1 -1
  29. package/build/src/hooks/usePaymentState.js +33 -23
  30. package/build/src/hooks/usePaymentState.js.map +1 -1
  31. package/build/src/hooks/useSolanaPaymentOptions.js +24 -5
  32. package/build/src/hooks/useSolanaPaymentOptions.js.map +1 -1
  33. package/build/src/hooks/useStellarPaymentOptions.js +13 -46
  34. package/build/src/hooks/useStellarPaymentOptions.js.map +1 -1
  35. package/build/src/hooks/useWalletPaymentOptions.js +41 -35
  36. package/build/src/hooks/useWalletPaymentOptions.js.map +1 -1
  37. package/build/src/payment/paymentEffects.js +10 -32
  38. package/build/src/payment/paymentEffects.js.map +1 -1
  39. package/build/src/provider/DaimoPayProvider.js +3 -5
  40. package/build/src/provider/DaimoPayProvider.js.map +1 -1
  41. package/build/src/provider/StellarContextProvider.js +7 -3
  42. package/build/src/provider/StellarContextProvider.js.map +1 -1
  43. package/build/utils/bridge.d.ts +2 -2
  44. package/package.json +2 -2
  45. package/build/src/utils/polling.js +0 -35
  46. package/build/src/utils/polling.js.map +0 -1
@@ -1,35 +0,0 @@
1
- /**
2
- * Will poll the given function at the specified interval. Stops when the
3
- * returned handle is invoked.
4
- */
5
- function startPolling({ key, intervalMs, pollFn, onResult, onError, log = console.log, }) {
6
- let active = true;
7
- let timer;
8
- const stop = () => {
9
- active = false;
10
- clearTimeout(timer);
11
- log(`[POLL] ${key} stopped`);
12
- };
13
- const tick = async () => {
14
- log(`[POLL] polling ${key}`);
15
- try {
16
- const res = await pollFn();
17
- if (!active)
18
- return;
19
- log(`[POLL] ${key} success`);
20
- onResult(res);
21
- }
22
- catch (e) {
23
- if (!active)
24
- return;
25
- log(`[POLL] ${key} error: ${e}`);
26
- onError(e);
27
- }
28
- timer = setTimeout(tick, intervalMs);
29
- };
30
- tick();
31
- return stop;
32
- }
33
-
34
- export { startPolling };
35
- //# sourceMappingURL=polling.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"polling.js","sources":["../../../src/utils/polling.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEA;;;AAGG;SACa,YAAY,CAAI,EAC9B,GAAG,EACH,UAAU,EACV,MAAM,EACN,QAAQ,EACR,OAAO,EACP,GAAG,GAAG,OAAO,CAAC,GAAG,GAQlB,EAAA;IACC,IAAI,MAAM,GAAG,IAAI,CAAC;AAClB,IAAA,IAAI,KAAqB,CAAC;IAE1B,MAAM,IAAI,GAAG,MAAK;QAChB,MAAM,GAAG,KAAK,CAAC;QACf,YAAY,CAAC,KAAK,CAAC,CAAC;AACpB,QAAA,GAAG,CAAC,CAAA,OAAA,EAAU,GAAG,CAAA,QAAA,CAAU,CAAC,CAAC;AAC/B,KAAC,CAAC;AAEF,IAAA,MAAM,IAAI,GAAG,YAAW;AACtB,QAAA,GAAG,CAAC,CAAA,eAAA,EAAkB,GAAG,CAAA,CAAE,CAAC,CAAC;AAC7B,QAAA,IAAI;AACF,YAAA,MAAM,GAAG,GAAG,MAAM,MAAM,EAAE,CAAC;AAC3B,YAAA,IAAI,CAAC,MAAM;gBAAE,OAAO;AACpB,YAAA,GAAG,CAAC,CAAA,OAAA,EAAU,GAAG,CAAA,QAAA,CAAU,CAAC,CAAC;YAC7B,QAAQ,CAAC,GAAG,CAAC,CAAC;SACf;QAAC,OAAO,CAAC,EAAE;AACV,YAAA,IAAI,CAAC,MAAM;gBAAE,OAAO;AACpB,YAAA,GAAG,CAAC,CAAU,OAAA,EAAA,GAAG,WAAW,CAAC,CAAA,CAAE,CAAC,CAAC;YACjC,OAAO,CAAC,CAAC,CAAC,CAAC;SACZ;AACD,QAAA,KAAK,GAAG,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;AACvC,KAAC,CAAC;AAEF,IAAA,IAAI,EAAE,CAAC;AAEP,IAAA,OAAO,IAAI,CAAC;AACd;;;;"}