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(
372372
373373 const status = statusResult . status ;
374374 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 ) ) ;
375380 setOnrampStatus ( "completed" ) ;
376381 // Add type field for discriminated union
377382 const typedStatusResult = {
You can’t perform that action at this time.
0 commit comments