From 2265d750a547cef5349aa72a11f8fc6294a44da7 Mon Sep 17 00:00:00 2001 From: Jamie Hewitt Date: Wed, 16 Nov 2022 18:08:59 +0300 Subject: [PATCH] Replacing console.error with loggerinstance.error --- src/components/Asset/AssetContent/MetaFull.tsx | 4 ++-- src/components/Asset/Edit/EditMetadata.tsx | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/Asset/AssetContent/MetaFull.tsx b/src/components/Asset/AssetContent/MetaFull.tsx index f2bbeaea9..038601ca6 100644 --- a/src/components/Asset/AssetContent/MetaFull.tsx +++ b/src/components/Asset/AssetContent/MetaFull.tsx @@ -4,7 +4,7 @@ import styles from './MetaFull.module.css' import Publisher from '@shared/Publisher' import { useAsset } from '@context/Asset' import { useWeb3 } from '@context/Web3' -import { Asset, Datatoken } from '@oceanprotocol/lib' +import { Asset, Datatoken, LoggerInstance } from '@oceanprotocol/lib' export default function MetaFull({ ddo }: { ddo: Asset }): ReactElement { const [paymentCollector, setPaymentCollector] = useState() @@ -21,7 +21,7 @@ export default function MetaFull({ ddo }: { ddo: Asset }): ReactElement { ) setPaymentCollector(paymentCollector) } catch (error) { - console.error(error) + LoggerInstance.error('[MetaFull: getInitialPaymentCollector]', error) } } getInitialPaymentCollector() diff --git a/src/components/Asset/Edit/EditMetadata.tsx b/src/components/Asset/Edit/EditMetadata.tsx index 664ccfe9f..b1b05d5ef 100644 --- a/src/components/Asset/Edit/EditMetadata.tsx +++ b/src/components/Asset/Edit/EditMetadata.tsx @@ -52,7 +52,10 @@ export default function Edit({ ) setPaymentCollector(paymentCollector) } catch (error) { - console.error(error) + LoggerInstance.error( + '[EditMetadata: getInitialPaymentCollector]', + error + ) } } getInitialPaymentCollector()