Open Bug 1470595 Opened 7 years ago Updated 3 years ago

It's possible to hit pay twice

Categories

(Firefox :: WebPayments UI, enhancement, P3)

x86_64
Linux
enhancement

Tracking

()

People

(Reporter: mrbkap, Unassigned)

References

Details

(Whiteboard: [webpayments-reserve])

On my Linux debug build, I was able to double-submit a payment on the whatwebcando.today Web Payments demo causing the DOM code to assert (for the second call, we no longer had a promise to resolve). I tried reading the code and found that we seem to update the payment button's "disabled" state asynchronously after we click on the button [1]. I think render was called from stateChangeCallback, which I think ran off of a promise. I wasn't able to reproduce this on my OSX (optimized) build, so this could be practically impossible to reproduce in the wild. I'm also not terribly confident in my diagnosis. To reproduce, I clicked on the button and smashed my spacebar once I'd entered enough information. [1] https://searchfox.org/mozilla-central/rev/93d2b9860b3d341258c7c5dcd4e278dea544432b/browser/components/payments/res/containers/payment-dialog.js#205,240,299
See Also: → 1429263
Whiteboard: [webpayments] [triage]
Priority: -- → P3
Whiteboard: [webpayments] [triage] → [webpayments-reserve]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.