@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.
- package/build/assets/chains.d.ts +14 -1
- package/build/hooks/useDaimoPay.d.ts +7 -2
- package/build/hooks/usePaymentState.d.ts +2 -0
- package/build/hooks/useSolanaPaymentOptions.d.ts +1 -1
- package/build/hooks/useStellarPaymentOptions.d.ts +1 -1
- package/build/hooks/useWalletPaymentOptions.d.ts +1 -18
- package/build/package.json.js +2 -2
- package/build/provider/StellarContextProvider.d.ts +9 -0
- package/build/src/components/Common/Modal/index.js +16 -2
- package/build/src/components/Common/Modal/index.js.map +1 -1
- package/build/src/components/DaimoPayButton/index.js +12 -15
- package/build/src/components/DaimoPayButton/index.js.map +1 -1
- package/build/src/components/Pages/Confirmation/index.js +2 -4
- package/build/src/components/Pages/Confirmation/index.js.map +1 -1
- package/build/src/components/Pages/Connectors/index.js +2 -2
- package/build/src/components/Pages/Connectors/index.js.map +1 -1
- package/build/src/components/Pages/PayWithToken/index.js +63 -48
- package/build/src/components/Pages/PayWithToken/index.js.map +1 -1
- package/build/src/components/Pages/Solana/PayWithSolanaToken/index.js +68 -34
- package/build/src/components/Pages/Solana/PayWithSolanaToken/index.js.map +1 -1
- package/build/src/components/Pages/Stellar/PayWithStellarToken/index.js +44 -21
- package/build/src/components/Pages/Stellar/PayWithStellarToken/index.js.map +1 -1
- package/build/src/components/Pages/WaitingDepositAddress/index.js +3 -2
- package/build/src/components/Pages/WaitingDepositAddress/index.js.map +1 -1
- package/build/src/constants/rozoConfig.js +3 -3
- package/build/src/constants/rozoConfig.js.map +1 -1
- package/build/src/hooks/useDaimoPay.js +37 -3
- package/build/src/hooks/useDaimoPay.js.map +1 -1
- package/build/src/hooks/usePaymentState.js +33 -23
- package/build/src/hooks/usePaymentState.js.map +1 -1
- package/build/src/hooks/useSolanaPaymentOptions.js +24 -5
- package/build/src/hooks/useSolanaPaymentOptions.js.map +1 -1
- package/build/src/hooks/useStellarPaymentOptions.js +13 -46
- package/build/src/hooks/useStellarPaymentOptions.js.map +1 -1
- package/build/src/hooks/useWalletPaymentOptions.js +41 -35
- package/build/src/hooks/useWalletPaymentOptions.js.map +1 -1
- package/build/src/payment/paymentEffects.js +10 -32
- package/build/src/payment/paymentEffects.js.map +1 -1
- package/build/src/provider/DaimoPayProvider.js +3 -5
- package/build/src/provider/DaimoPayProvider.js.map +1 -1
- package/build/src/provider/StellarContextProvider.js +7 -3
- package/build/src/provider/StellarContextProvider.js.map +1 -1
- package/build/utils/bridge.d.ts +2 -2
- package/package.json +2 -2
- package/build/src/utils/polling.js +0 -35
- 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;;;;"}
|