mirror of
https://github.com/Kvan7/Exiled-Exchange-2.git
synced 2025-10-30 14:17:55 +00:00
Fix normalized showing 0 when should be undefined
This commit is contained in:
@@ -13,13 +13,14 @@
|
||||
>{{ result.priceAmount }} {{ result.priceCurrency
|
||||
}}{{
|
||||
result.priceCurrency !== "exalted" &&
|
||||
result.priceCurrency !== "divine"
|
||||
result.priceCurrency !== "divine" &&
|
||||
result.normalizedPrice
|
||||
? ` (${result.normalizedPrice} ${
|
||||
result.normalizedPriceCurrency === "exalted"
|
||||
result.normalizedPriceCurrency! === "exalted"
|
||||
? "ex"
|
||||
: result.normalizedPriceCurrency === "chaos"
|
||||
: result.normalizedPriceCurrency! === "chaos"
|
||||
? "c"
|
||||
: result.normalizedPriceCurrency
|
||||
: result.normalizedPriceCurrency!
|
||||
})`
|
||||
: ""
|
||||
}}</span
|
||||
|
||||
@@ -296,8 +296,8 @@ export interface PricingResult {
|
||||
priceAmount: number;
|
||||
priceCurrency: string;
|
||||
priceCurrencyRank?: number;
|
||||
normalizedPrice: string;
|
||||
normalizedPriceCurrency: string;
|
||||
normalizedPrice?: string;
|
||||
normalizedPriceCurrency?: string;
|
||||
isMine: boolean;
|
||||
hasNote: boolean;
|
||||
isInstantBuyout: boolean;
|
||||
@@ -991,13 +991,12 @@ export async function requestResults(
|
||||
currency: "exalted",
|
||||
}
|
||||
: // otherwise convert to stable
|
||||
(cachedCurrencyByQuery(query, result.listing.price?.amount ?? 0) ?? {
|
||||
min: 0,
|
||||
max: 0,
|
||||
currency: "exalted",
|
||||
});
|
||||
const normalizedPrice = displayRounding(normalizedCurrency.min);
|
||||
const normalizedPriceCurrency = normalizedCurrency.currency;
|
||||
cachedCurrencyByQuery(query, result.listing.price?.amount ?? 0);
|
||||
const normalizedPrice =
|
||||
normalizedCurrency !== undefined
|
||||
? displayRounding(normalizedCurrency.min)
|
||||
: undefined;
|
||||
const normalizedPriceCurrency = normalizedCurrency?.currency;
|
||||
|
||||
return {
|
||||
id: result.id,
|
||||
|
||||
Reference in New Issue
Block a user