From 027eed1b25a0cad6024fa5390b1ea1dc69d129fc Mon Sep 17 00:00:00 2001 From: Keith Holliday Date: Fri, 2 Feb 2018 11:22:25 -0700 Subject: [PATCH] Reset market on gear purchase (#9855) --- website/client/store/actions/shops.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/website/client/store/actions/shops.js b/website/client/store/actions/shops.js index 9c6ba016dd..68ac4597e7 100644 --- a/website/client/store/actions/shops.js +++ b/website/client/store/actions/shops.js @@ -14,8 +14,16 @@ import { getDropClass } from 'client/libs/notifications'; export function buyItem (store, params) { const quantity = params.quantity || 1; const user = store.state.user.data; + + const userPinned = user.pinnedItems.slice(); let opResult = buyOp(user, {params, quantity}); + // @TODO: Currently resetting the pinned items will reset the market. Purchasing some items does not reset pinned. + // For now, I've added this hack for items like contributor gear to update while I am working on add more computed + // properties to the market. We will use this quick fix while testing the other changes. + user.pinnedItems = userPinned; + + return { result: opResult, httpCall: axios.post(`/api/v3/user/buy/${params.key}`),