Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last sale Price #167

Open
Innursery opened this issue Apr 1, 2017 · 0 comments
Open

Last sale Price #167

Innursery opened this issue Apr 1, 2017 · 0 comments

Comments

@Innursery
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant