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:
parent
5ab6b7dc66
commit
d51538a32f
@ -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} />}
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user