@@ -172,7 +172,11 @@ export const AppProvider: React.FC<AppProviderProps> = ({
172172 if ( state . order ) {
173173 dispatch ( { type : ActionType . START_LOADING } )
174174
175- const others = calculateSettings ( order , state . isShipmentRequired )
175+ const others = calculateSettings (
176+ order ,
177+ state . isShipmentRequired ,
178+ state . customerAddresses
179+ )
176180
177181 dispatch ( {
178182 type : ActionType . CHANGE_COUPON_OR_GIFTCARD ,
@@ -190,7 +194,11 @@ export const AppProvider: React.FC<AppProviderProps> = ({
190194 // TODO Remove after fixing components
191195 const order = await fetchOrder ( cl , orderId )
192196
193- const others = calculateSettings ( order , state . isShipmentRequired )
197+ const others = calculateSettings (
198+ order ,
199+ state . isShipmentRequired ,
200+ state . customerAddresses
201+ )
194202
195203 dispatch ( {
196204 type : ActionType . SELECT_SHIPMENT ,
@@ -209,7 +217,11 @@ export const AppProvider: React.FC<AppProviderProps> = ({
209217 dispatch ( { type : ActionType . START_LOADING } )
210218
211219 const order = await fetchOrder ( cl , orderId )
212- const others = calculateSettings ( order , state . isShipmentRequired )
220+ const others = calculateSettings (
221+ order ,
222+ state . isShipmentRequired ,
223+ state . customerAddresses
224+ )
213225
214226 dispatch ( {
215227 type : ActionType . SAVE_SHIPMENTS ,
@@ -223,8 +235,12 @@ export const AppProvider: React.FC<AppProviderProps> = ({
223235 const saveShipments = async ( ) => {
224236 dispatch ( { type : ActionType . START_LOADING } )
225237 const order = await getOrderFromRef ( )
226-
227- const others = calculateSettings ( order , state . isShipmentRequired )
238+ console . log ( order )
239+ const others = calculateSettings (
240+ order ,
241+ state . isShipmentRequired ,
242+ state . customerAddresses
243+ )
228244
229245 setTimeout ( ( ) => {
230246 dispatch ( {
@@ -238,7 +254,11 @@ export const AppProvider: React.FC<AppProviderProps> = ({
238254 dispatch ( { type : ActionType . START_LOADING } )
239255 const order = await getOrderFromRef ( )
240256
241- const others = calculateSettings ( order , state . isShipmentRequired )
257+ const others = calculateSettings (
258+ order ,
259+ state . isShipmentRequired ,
260+ state . customerAddresses
261+ )
242262
243263 dispatch ( {
244264 type : ActionType . SET_PAYMENT ,
0 commit comments