Skip to content

Commit cbc4e80

Browse files
authored
fix: onramp improvements (#6437)
1 parent efceadd commit cbc4e80

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.changeset/puny-breads-return.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": minor
3+
---
4+
5+
Several onramp embed improvements

packages/thirdweb/src/react/core/hooks/pay/useBuyWithCryptoQuote.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export function useBuyWithCryptoQuote(
8080
return useQuery({
8181
...queryParams,
8282
queryKey: ["buyWithCryptoQuote", params],
83+
refetchInterval: 20_000,
8384
queryFn: () => {
8485
if (!params) {
8586
throw new Error("Swap params are required");

packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ function useOnRampScreenState(props: {
440440
// retry the quote step
441441
setSwapTxHash(undefined);
442442
swapMutation.reset();
443-
swapQuoteQuery.refetch();
443+
await swapQuoteQuery.refetch();
444444
}
445445
}, [
446446
isDone,

0 commit comments

Comments
 (0)