diff --git a/src/components/Asset/AssetContent/MetaFull.tsx b/src/components/Asset/AssetContent/MetaFull.tsx index 038601ca6..f662fa374 100644 --- a/src/components/Asset/AssetContent/MetaFull.tsx +++ b/src/components/Asset/AssetContent/MetaFull.tsx @@ -13,13 +13,11 @@ export default function MetaFull({ ddo }: { ddo: Asset }): ReactElement { useEffect(() => { async function getInitialPaymentCollector() { - let paymentCollector try { const datatoken = new Datatoken(web3) - paymentCollector = await datatoken.getPaymentCollector( - ddo.datatokens[0].address + setPaymentCollector( + await datatoken.getPaymentCollector(ddo.datatokens[0].address) ) - setPaymentCollector(paymentCollector) } catch (error) { LoggerInstance.error('[MetaFull: getInitialPaymentCollector]', error) } diff --git a/src/components/Asset/Edit/EditMetadata.tsx b/src/components/Asset/Edit/EditMetadata.tsx index b1b05d5ef..ef727b591 100644 --- a/src/components/Asset/Edit/EditMetadata.tsx +++ b/src/components/Asset/Edit/EditMetadata.tsx @@ -47,10 +47,9 @@ export default function Edit({ let paymentCollector try { const datatoken = new Datatoken(web3) - paymentCollector = await datatoken.getPaymentCollector( - asset?.datatokens[0].address + setPaymentCollector( + await datatoken.getPaymentCollector(ddo.datatokens[0].address) ) - setPaymentCollector(paymentCollector) } catch (error) { LoggerInstance.error( '[EditMetadata: getInitialPaymentCollector]',