From f865f251b33bfd2ccac1de3d6d188240dfc23906 Mon Sep 17 00:00:00 2001 From: Alefe Souza Date: Fri, 20 Sep 2024 09:52:09 -0300 Subject: [PATCH] Fix unit tests --- .../woopay/save-user/checkout-page-save-user.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/client/components/woopay/save-user/checkout-page-save-user.js b/client/components/woopay/save-user/checkout-page-save-user.js index e753f5c67f3..693ac30ed29 100644 --- a/client/components/woopay/save-user/checkout-page-save-user.js +++ b/client/components/woopay/save-user/checkout-page-save-user.js @@ -48,14 +48,13 @@ const CheckoutPageSaveUser = ( { isBlocksCheckout } ) => { select( CHECKOUT_STORE_KEY ).isProcessing() ); - const { billingAddressPhone, isCustomerDataUpdating } = useSelect( - ( select ) => { - const store = select( CART_STORE_KEY ); - return { - billingAddressPhone: store.getCartData()?.billingAddress?.phone, - isCustomerDataUpdating: store.isCustomerDataUpdating(), - }; - } + const billingAddressPhone = useSelect( + ( select ) => + select( CART_STORE_KEY ).getCartData()?.billingAddress?.phone + ); + + const isCustomerDataUpdating = useSelect( ( select ) => + select( CART_STORE_KEY ).isCustomerDataUpdating() ); const isRegisteredUser = useWooPayUser();