fifa-autobuyer
fifa-autobuyer copied to clipboard
Last sale Price
in re-list function how can I get the last sale price or in other word my buy price
export function relistItems(settings) { return async (dispatch, getState) => { const state = getState(); const api = getApi(state.account.email); const expired = state.bid.tradepile.filter(i => i.tradeState === 'expired'); if (expired.length > 0) { dispatch(addMessage('log', 'Re-listing expired items...')); let relistFailed = false; if (settings.relistAll) { try { const relist = await api.relist(); if (relist.code === 500) { relistFailed = true; } } catch (e) { dispatch(addMessage('error', 'Error attempting to relist all auctions', e)); relistFailed = true; } } // Relist all failed? Do it manually. if (!settings.relistAll || relistFailed) { dispatch(addMessage('log',
Manually re-listing ${expired.length} players.)); for (const i of expired) { const baseId = Fut.getBaseId(i.itemData.resourceId); const priceDetails = _.get(state.player,
list.${baseId}.price, false); try { if (!settings.relistAll && priceDetails) { await api.listItem(i.itemData.id, priceDetails.sell, priceDetails.bin, 3600); } else { await api.listItem(i.itemData.id, i.startingBid, i.buyNowPrice, 3600); } } catch (e) { dispatch(addMessage('error', 'Error manually re-listing player', e)); } } } } }; }
I try i.LastSalePrice
andpriceDetails.LastSalePrice
but always get undefined return.