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" title="Owner"
content={<Publisher account={ddo?.nft?.owner} />} content={<Publisher account={ddo?.nft?.owner} />}
/> />
{paymentCollector !== ddo?.nft?.owner && ( {paymentCollector && paymentCollector !== ddo?.nft?.owner && (
<MetaItem <MetaItem
title="Revenue Sent To" title="Revenue Sent To"
content={<Publisher account={paymentCollector} />} content={<Publisher account={paymentCollector} />}

View File

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