From 12f6cfcb8049fb035bcbeabe099af51329334667 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 12 Sep 2019 11:33:20 +0200 Subject: [PATCH] test fixes --- client/src/components/templates/Asset/AssetDetails.tsx | 7 ++----- client/src/components/templates/Asset/index.test.tsx | 1 - 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/client/src/components/templates/Asset/AssetDetails.tsx b/client/src/components/templates/Asset/AssetDetails.tsx index 14ce9a8..c9ec9fc 100644 --- a/client/src/components/templates/Asset/AssetDetails.tsx +++ b/client/src/components/templates/Asset/AssetDetails.tsx @@ -33,6 +33,7 @@ const MetaFixedItem = ({ name, value }: { name: string; value: string }) => ( export default function AssetDetails({ metadata, ddo }: AssetDetailsProps) { const { base } = metadata + const price = base.price && Web3.utils.fromWei(base.price.toString()) const metaFixed = [ { @@ -52,11 +53,7 @@ export default function AssetDetails({ metadata, ddo }: AssetDetailsProps) { }, { name: 'Price', - value: `${ - base.price === '0' - ? 0 - : Web3.utils.fromWei(base.price.toString()) - } OCEAN`, + value: `${price === '0' ? 0 : price} OCEAN`, show: allowPricing } ] diff --git a/client/src/components/templates/Asset/index.test.tsx b/client/src/components/templates/Asset/index.test.tsx index f4158b6..30f1e1d 100644 --- a/client/src/components/templates/Asset/index.test.tsx +++ b/client/src/components/templates/Asset/index.test.tsx @@ -16,6 +16,5 @@ describe('Details', () => { /> ) expect(container.firstChild).toBeInTheDocument() - expect(container.querySelector('.loader')).toBeInTheDocument() }) })