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"
|
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} />}
|
||||||
|
@ -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(
|
||||||
|
Loading…
Reference in New Issue
Block a user