Closed Bug 1454129 Opened 6 years ago Closed 6 years ago

Use nsIPaymentRequest.shippingOption to determine the selected shipping option

Categories

(Firefox :: WebPayments UI, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 61
Tracking Status
firefox61 --- fixed

People

(Reporter: MattN, Assigned: MattN)

References

Details

(Whiteboard: [webpayments])

Attachments

(1 file)

Attachment #8968337 - Flags: review?(sfoster)
Comment on attachment 8968337 [details]
Bug 1454129 - Use nsIPaymentRequest.shippingOption to determine the selected shipping option.

https://reviewboard.mozilla.org/r/237004/#review243526

::: toolkit/components/payments/res/containers/payment-dialog.js:157
(Diff revision 2)
>      }
>  
>      // Ensure `selectedShippingOption` never refers to a deleted shipping option and
>      // refers to a shipping option if one exists.
>      if (shippingOptions &&
>          !shippingOptions.find(option => option.id == selectedShippingOption)) {

Nit: It seems selectedShippingOption could be null at this point. Matching it against the option.ids should result in the correct result but it would be nice to bypass the rather pointless find loop in that case.
Attachment #8968337 - Flags: review?(sfoster) → review+
Pushed by mozilla@noorenberghe.ca:
https://hg.mozilla.org/integration/autoland/rev/d37fc2398bea
Use nsIPaymentRequest.shippingOption to determine the selected shipping option. r=sfoster
https://hg.mozilla.org/mozilla-central/rev/d37fc2398bea
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Product: Toolkit → Firefox
Target Milestone: mozilla61 → Firefox 61
You need to log in before you can comment on or make changes to this bug.