woocommerce/plugins/woocommerce-blocks/assets/js/base/context/providers
Raluca Stan 27600b3309 Update canMakePayment to receive cart as argument and make it react to changes in billingData. (https://github.com/woocommerce/woocommerce-blocks/pull/4776)
* Add 	cartCoupons to canMakePayment argument

* Add cart to the paymentMethodArgument and improve the dependencies for the effect calling refreshCanMakePayments

* Debounce refreshCanMakePayments

The initial approach was to debounce billingData and use this value as a dependency for the useEffect that runs refreshCanMakePayments.
But because the depencies array can always change we decided to debounce the callback instead, ensuring this way that callback is not called multiple times: for example when typing a field in the billing address. Debounced was chosen instead of throttle because we want to call refreshCanMakePayments once the change event has stopped, with the final value.

* Update types and docs related to canMakePaymentArgument

* Mock the /cart call when testing payment methods

* Remove unused cartCoupons key in canMakePaymentArguments' interface
2021-09-23 16:27:02 +01:00
..
add-to-cart-form Improvements to `emitEventWithAbort`. (https://github.com/woocommerce/woocommerce-blocks/pull/4158) 2021-05-07 16:39:28 -04:00
cart-checkout Update canMakePayment to receive cart as argument and make it react to changes in billingData. (https://github.com/woocommerce/woocommerce-blocks/pull/4776) 2021-09-23 16:27:02 +01:00
store-notices Add padding in 2020 and 2021 (https://github.com/woocommerce/woocommerce-blocks/pull/4588) 2021-08-17 12:03:07 +01:00
store-snackbar-notices Add optimizations around checkout filter calls (https://github.com/woocommerce/woocommerce-blocks/pull/4570) 2021-08-13 15:42:09 +02:00
validation Remove absolute positioning on error message (https://github.com/woocommerce/woocommerce-blocks/pull/4734) 2021-09-15 14:03:21 +01:00
container-width-context.js Fix Circular Dependencies During Builds (https://github.com/woocommerce/woocommerce-blocks/pull/4025) 2021-04-08 13:31:12 +01:00
editor-context.js Fix Circular Dependencies During Builds (https://github.com/woocommerce/woocommerce-blocks/pull/4025) 2021-04-08 13:31:12 +01:00
index.js Create `StoreNoticesWithSnackbarProvider` (https://github.com/woocommerce/woocommerce-blocks/pull/4407) 2021-07-05 09:38:08 +01:00
query-state-context.js Fix Circular Dependencies During Builds (https://github.com/woocommerce/woocommerce-blocks/pull/4025) 2021-04-08 13:31:12 +01:00