File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
packages/thirdweb/src/react/core/hooks Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " thirdweb " : patch
3
+ ---
4
+
5
+ Prevents incorrect failures in widget onramps.
Original file line number Diff line number Diff line change @@ -372,6 +372,11 @@ export function useStepExecutor(
372
372
373
373
const status = statusResult . status ;
374
374
if ( status === "COMPLETED" ) {
375
+ /*
376
+ * The occasional race condition can happen where the onramp provider gives us completed status before the token balance has updated in our RPC.
377
+ * We add this pause so the simulation doesn't fail on the next step.
378
+ */
379
+ await new Promise ( ( resolve ) => setTimeout ( resolve , 2000 ) ) ;
375
380
setOnrampStatus ( "completed" ) ;
376
381
// Add type field for discriminated union
377
382
const typedStatusResult = {
You can’t perform that action at this time.
0 commit comments