mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2025-07-20 05:30:04 -04:00
return undefined when external price not available
This commit is contained in:
parent
27c35e5503
commit
d60638b00f
1 changed files with 1 additions and 1 deletions
|
@ -844,7 +844,7 @@ export default class HavenoClient {
|
|||
try {
|
||||
return (await this._priceClient.getMarketPrice(new MarketPriceRequest().setCurrencyCode(assetCode), {password: this._password})).getPrice();
|
||||
} catch (e: any) {
|
||||
if (e.message.indexOf("not found") >= 0) return undefined; // TODO: return unknown price server side (0?)
|
||||
if (e.message.indexOf("not found") >= 0 || e.message.indexOf("not available") >= 0) return undefined; // TODO: return unknown price server side (0?)
|
||||
throw new HavenoError(e.message, e.code);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue