Skip to content

Commit

Permalink
remove setting customerAccessToken from cart buyeridentity. Because t…
Browse files Browse the repository at this point in the history
…he CA API customerAccessToken only works in buyerConext
  • Loading branch information
michenly committed May 15, 2024
1 parent 0baf691 commit 77d47ac
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/routes/($locale).cart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ import {useRootLoaderData} from '~/hooks/useRootLoaderData';
export async function action({request, context}: ActionFunctionArgs) {
const {cart} = context;

const [formData, customerAccessToken] = await Promise.all([
request.formData(),
context.customerAccount.getAccessToken(),
]);
const formData = await request.formData();

const {action, inputs} = CartForm.getFormInput(formData);
invariant(action, 'No cartAction defined');
Expand Down Expand Up @@ -55,7 +52,6 @@ export async function action({request, context}: ActionFunctionArgs) {
case CartForm.ACTIONS.BuyerIdentityUpdate:
result = await cart.updateBuyerIdentity({
...inputs.buyerIdentity,
customerAccessToken,
});
break;
default:
Expand Down

0 comments on commit 77d47ac

Please sign in to comment.