1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

Only showing payment collector if it is different to the owner

This commit is contained in:
Jamie Hewitt 2022-11-17 13:39:49 +03:00
parent 5ab6b7dc66
commit d51538a32f
2 changed files with 2 additions and 3 deletions

View File

@ -40,7 +40,7 @@ export default function MetaFull({ ddo }: { ddo: Asset }): ReactElement {
title="Owner"
content={<Publisher account={ddo?.nft?.owner} />}
/>
{paymentCollector !== ddo?.nft?.owner && (
{paymentCollector && paymentCollector !== ddo?.nft?.owner && (
<MetaItem
title="Revenue Sent To"
content={<Publisher account={paymentCollector} />}

View File

@ -44,11 +44,10 @@ export default function Edit({
useEffect(() => {
async function getInitialPaymentCollector() {
let paymentCollector
try {
const datatoken = new Datatoken(web3)
setPaymentCollector(
await datatoken.getPaymentCollector(ddo.datatokens[0].address)
await datatoken.getPaymentCollector(asset?.datatokens[0].address)
)
} catch (error) {
LoggerInstance.error(