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

add integration link

This commit is contained in:
mihaisc 2022-11-16 11:39:28 +02:00
parent 131f1f15e3
commit daf7865fec
3 changed files with 26 additions and 3 deletions

View File

@ -8,7 +8,7 @@ module.exports = {
metadataCacheUri:
process.env.NEXT_PUBLIC_METADATACACHE_URI ||
'https://v4.aquarius.oceanprotocol.com',
calicaUri: 'https://calica.xyz/ocean/contracts',
// List of chainIds which metadata cache queries will return by default.
// This preselects the Chains user preferences.
chainIds: [1, 137, 56, 246, 1285],

View File

@ -0,0 +1,21 @@
import { useAsset } from '@context/Asset'
import React from 'react'
import { useWeb3 } from '@context/Web3'
import { calicaUri } from 'app.config'
export default function CalicaIntegration() {
const { isOwner } = useAsset()
const { accountId } = useWeb3()
return isOwner ? (
<a
href={`${calicaUri}/${accountId}`}
target="_blank"
rel="noreferrer"
title="Use Calica for revenue split"
>
Use Calica for revenue split
</a>
) : (
<></>
)
}

View File

@ -1,6 +1,6 @@
import React, { ReactElement, useState, useEffect } from 'react'
import Compute from './Compute'
import Consume from './Download'
import Download from './Download'
import { FileInfo, LoggerInstance, Datatoken } from '@oceanprotocol/lib'
import Tabs, { TabsItem } from '@shared/atoms/Tabs'
import { compareAsBN } from '@utils/numbers'
@ -16,6 +16,7 @@ import { useFormikContext } from 'formik'
import { FormPublishData } from 'src/components/Publish/_types'
import { getTokenBalanceFromSymbol } from '@utils/web3'
import AssetStats from './AssetStats'
import CalicaIntegration from './CalicaIntegration'
export default function AssetActions({
asset
@ -136,7 +137,7 @@ export default function AssetActions({
fileIsLoading={fileIsLoading}
/>
) : (
<Consume
<Download
asset={asset}
dtBalance={dtBalance}
isBalanceSufficient={isBalanceSufficient}
@ -144,6 +145,7 @@ export default function AssetActions({
fileIsLoading={fileIsLoading}
/>
)}
<CalicaIntegration />
<AssetStats />
</>
)