Skip to content

Commit

Permalink
fix checks
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanfazakas committed Aug 29, 2023
1 parent b88ddaf commit bced42d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/@shared/AssetTeaser/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function AssetTeaser({
const price: AssetPrice = asset.stats.price.value
? asset?.stats?.price
: {
value: Number(asset.accessDetails.price),
value: Number(asset?.accessDetails?.price),
tokenSymbol: asset?.accessDetails?.baseToken?.symbol,
tokenAddress: asset?.accessDetails?.baseToken?.address
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Asset/AssetActions/Compute/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ export default function Compute({
const { isSupportedOceanNetwork } = useNetworkMetadata()
const { isAssetNetwork } = useAsset()

const price: AssetPrice = asset.stats.price.value
const price: AssetPrice = asset?.stats?.price?.value
? asset?.stats?.price
: {
value: Number(asset.accessDetails.price),
value: Number(asset?.accessDetails?.price),
tokenSymbol: asset?.accessDetails?.baseToken?.symbol,
tokenAddress: asset?.accessDetails?.baseToken?.address
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Asset/AssetActions/Download.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ export default function Download({
useState<OrderPriceAndFees>()
const [retry, setRetry] = useState<boolean>(false)

const price: AssetPrice = asset.stats.price.value
const price: AssetPrice = asset?.stats?.price?.value
? asset?.stats?.price
: {
value: Number(asset.accessDetails.price),
value: Number(asset?.accessDetails?.price),
tokenSymbol: asset?.accessDetails?.baseToken?.symbol,
tokenAddress: asset?.accessDetails?.baseToken?.address
}
Expand Down

0 comments on commit bced42d

Please sign in to comment.