Skip to content

Commit 82d7cd0

Browse files
committed
Prevent double-tap on Next in gift card purchase scene
Add isCreatingOrder to the early-return guard in handleNextPress so a second tap during the brief window before React disables the button cannot trigger duplicate order creation.
1 parent e279f18 commit 82d7cd0

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/components/scenes/GiftCardPurchaseScene.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,12 @@ export const GiftCardPurchaseScene: React.FC<Props> = props => {
355355
})
356356

357357
const handleNextPress = useHandler(async () => {
358-
if (selectedAmount == null || provider == null || !isReady) {
358+
if (
359+
selectedAmount == null ||
360+
provider == null ||
361+
!isReady ||
362+
isCreatingOrder
363+
) {
359364
return
360365
}
361366

0 commit comments

Comments
 (0)