mirror of
https://github.com/oceanprotocol/market.git
synced 2024-11-15 01:34:57 +01:00
fix marketFeeAddress (#633)
* fix marketFeeAddress * UseSiteMetadata typing fixes
This commit is contained in:
parent
29b644f402
commit
94139f42b4
@ -54,7 +54,7 @@ export default function Compute({
|
||||
dtBalance: string
|
||||
file: FileMetadata
|
||||
}): ReactElement {
|
||||
const { marketFeeAddress } = useSiteMetadata()
|
||||
const { appConfig } = useSiteMetadata()
|
||||
const { accountId } = useWeb3()
|
||||
const { ocean, account, config } = useOcean()
|
||||
const { price, type, ddo } = useAsset()
|
||||
@ -296,7 +296,7 @@ export default function Compute({
|
||||
ddo.id,
|
||||
computeService.index,
|
||||
computeAlgorithm,
|
||||
marketFeeAddress,
|
||||
appConfig.marketFeeAddress,
|
||||
undefined,
|
||||
false
|
||||
)
|
||||
@ -316,7 +316,7 @@ export default function Compute({
|
||||
serviceAlgo.type,
|
||||
accountId,
|
||||
serviceAlgo.index,
|
||||
marketFeeAddress,
|
||||
appConfig.marketFeeAddress,
|
||||
undefined,
|
||||
false
|
||||
)
|
||||
|
@ -44,7 +44,7 @@ export default function Consume({
|
||||
}): ReactElement {
|
||||
const { accountId } = useWeb3()
|
||||
const { ocean } = useOcean()
|
||||
const { marketFeeAddress } = useSiteMetadata()
|
||||
const { appConfig } = useSiteMetadata()
|
||||
const [hasPreviousOrder, setHasPreviousOrder] = useState(false)
|
||||
const [previousOrderId, setPreviousOrderId] = useState<string>()
|
||||
const { isInPurgatory, price, type } = useAsset()
|
||||
@ -131,7 +131,7 @@ export default function Consume({
|
||||
ddo.id,
|
||||
ddo.dataToken,
|
||||
'access',
|
||||
marketFeeAddress,
|
||||
appConfig.marketFeeAddress,
|
||||
previousOrderId
|
||||
)
|
||||
setHasPreviousOrder(true)
|
||||
|
@ -1,5 +1,35 @@
|
||||
import { useStaticQuery, graphql } from 'gatsby'
|
||||
|
||||
interface UseSiteMetadata {
|
||||
siteTitle: string
|
||||
siteTagline: string
|
||||
siteUrl: string
|
||||
siteIcon: string
|
||||
siteImage: { childImageSharp: { original: { src: string } } }
|
||||
copyright: string
|
||||
menu: {
|
||||
name: string
|
||||
link: string
|
||||
}[]
|
||||
warning: {
|
||||
main: string
|
||||
polygonPublish: string
|
||||
}
|
||||
announcement: {
|
||||
main: string
|
||||
polygon: string
|
||||
}
|
||||
appConfig: {
|
||||
infuraProjectId: string
|
||||
network: string
|
||||
marketFeeAddress: string
|
||||
currencies: string[]
|
||||
portisId: string
|
||||
allowFixedPricing: string
|
||||
allowDynamicPricing: string
|
||||
}
|
||||
}
|
||||
|
||||
const query = graphql`
|
||||
query {
|
||||
site {
|
||||
@ -53,10 +83,10 @@ const query = graphql`
|
||||
}
|
||||
`
|
||||
|
||||
export function useSiteMetadata() {
|
||||
export function useSiteMetadata(): UseSiteMetadata {
|
||||
const data = useStaticQuery(query)
|
||||
|
||||
const siteMeta = {
|
||||
const siteMeta: UseSiteMetadata = {
|
||||
...data.siteImage.edges[0].node.childContentJson.site,
|
||||
...data.site.siteMetadata
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user