tf-checkout-react 1.7.17 → 1.7.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.7.17",
2
+ "version": "1.7.19",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -906,6 +906,10 @@ const BillingInfoContainer = React.memo(
906
906
  )
907
907
  setCheckoutData(checkoutDataObj)
908
908
  setSingleCheckoutAddOns(mergedAddOns)
909
+ const updatedAttributes = _get(checkoutResponse, 'data.attributes', {})
910
+ if (updatedAttributes.additional_payment_information) {
911
+ setCheckoutUpdateData(updatedAttributes)
912
+ }
909
913
  }
910
914
  } catch (error) {
911
915
  const errorMessage = _get(
@@ -929,9 +933,9 @@ const BillingInfoContainer = React.memo(
929
933
  )
930
934
 
931
935
  const onAddOnSelect = useCallback(
932
- (id: string, value: string, addon: any, fieldUpdates: Record<string, any> = {}) => {
936
+ (id: string, value: string, _addon: any, fieldUpdates: Record<string, any> = {}) => {
933
937
  const quantity = parseInt(value) || 0
934
- const addonId = addon.id || id
938
+ const addonId = id
935
939
 
936
940
  // Get current add-ons and their custom fields
937
941
  const currentAddOns = JSON.parse(localStorage.getItem('add_ons') || '{}')