Reset market on gear purchase (#9855)
This commit is contained in:
@@ -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}`),
|
||||
|
||||
Reference in New Issue
Block a user