Handle missing price (show 0)

This commit is contained in:
nymkappa
2023-03-04 10:51:13 +09:00
parent 51d50292e6
commit d483362a9b
8 changed files with 141 additions and 80 deletions

View File

@@ -89,7 +89,7 @@ export class PriceService {
return this.singlePriceObservable$.pipe(
map((conversion) => {
if (conversion.prices.length <= 0) {
return this.getEmptyPrice();
return undefined;
}
return {
price: {
@@ -113,7 +113,7 @@ export class PriceService {
return this.priceObservable$.pipe(
map((conversion) => {
if (!blockTimestamp) {
if (!blockTimestamp || !conversion) {
return undefined;
}