keep using leagacy exchange api

This commit is contained in:
Alexander Drozdov
2022-05-12 14:54:58 +03:00
parent 9f117bcd63
commit ab88e4c2d4
3 changed files with 8 additions and 6 deletions
@@ -7,7 +7,8 @@ import { ParsedItem } from '@/parser'
import { Cache } from './Cache'
interface TradeRequest { /* eslint-disable camelcase */
exchange: {
engine: 'legacy' // TODO: blocked by https://www.pathofexile.com/forum/view-thread/3265663
query: {
status: { option: 'online' | 'onlineleague' | 'any' }
have: string[]
want: string[]
@@ -19,7 +20,7 @@ interface TradeRequest { /* eslint-disable camelcase */
interface FetchResult {
id: string
listing: {
indexed: string
// indexed: string // not available in legacy engine now
price: {
exchange: {
amount: number
@@ -106,7 +107,7 @@ export async function requestResults (
.map<PricingResult>(result => {
return {
id: result.id,
relativeDate: DateTime.fromISO(result.listing.indexed).toRelative({ style: 'short' }) ?? '',
relativeDate: DateTime.fromISO('').toRelative({ style: 'short' }) ?? '',
exchangeAmount: result.listing.price.exchange.amount,
itemAmount: result.listing.price.item.amount,
stock: result.listing.price.item.stock,
@@ -138,7 +139,8 @@ const HAVE_CURRENCY = ['exalted', 'chaos']
export async function execBulkSearch (item: ParsedItem, filters: ItemFilters): Promise<BulkSearch> {
const resultByHave = await Promise.all(HAVE_CURRENCY.map(async (have) => {
const query = await requestTradeResultList({
exchange: {
engine: 'legacy',
query: {
have: [have],
want: [tradeTag(item)!],
status: {
+1 -1
View File
@@ -9,7 +9,7 @@
<div v-else
class="border-b mx-2 border-gray-800" />
</template>
<div class="text-gray-400 text-center mt-auto pr-3 pt-4 pb-12" style="max-width: fit-content;">{{ t('Support development on') }}<br> <a href="https://patreon.com/awakened_poe_trade" class="inline-flex mt-1" target="_blank"><img class="inline h-5" src="/images/Patreon.svg"></a></div>
<div class="text-gray-400 text-center mt-auto pr-3 pt-4 pb-12" style="max-width: fit-content; min-width: 100%;">{{ t('Support development on') }}<br> <a href="https://patreon.com/awakened_poe_trade" class="inline-flex mt-1" target="_blank"><img class="inline h-5" src="/images/Patreon.svg"></a></div>
</div>
<div class="text-gray-100 flex-grow layout-column bg-gray-900">
<div class="flex-grow overflow-y-auto bg-gray-800 rounded-tl">
@@ -1,6 +1,6 @@
<template>
<div :class="$style['row']" >
<div class="flex-1 flex items-center px-2 overflow-hidden gap-x-1">
<div class="flex-1 flex items-center px-2 overflow-hidden gap-x-1 whitespace-nowrap">
<span v-if="matcher.outdated" :class="[$style['tag'], $style['tag-outdated']]">{{ t('map.mods.outdated') }}</span>
<span v-if="matcher.heist" :class="[$style['tag'], $style['tag-heist']]">{{ t('map.mods.heist') }}</span>
<span class="truncate">{{ matcher.str }}</span>