mirror of
https://github.com/oceanprotocol/market.git
synced 2024-11-15 01:34:57 +01:00
Merge pull request #46 from oceanprotocol/feature/market-fee
configurable market fee values
This commit is contained in:
commit
b35a11b3bb
@ -2,3 +2,5 @@
|
|||||||
GATSBY_NETWORK="rinkeby"
|
GATSBY_NETWORK="rinkeby"
|
||||||
|
|
||||||
#GATSBY_INFURA_PROJECT_ID="xxx"
|
#GATSBY_INFURA_PROJECT_ID="xxx"
|
||||||
|
#GATSBY_MARKET_FEE_ADDRESS="0xxx"
|
||||||
|
#GATSBY_MARKET_FEE_AMOUNT="xxx"
|
@ -15,7 +15,9 @@ const appConfig = {
|
|||||||
verbose: 3
|
verbose: 3
|
||||||
},
|
},
|
||||||
network,
|
network,
|
||||||
infuraProjectId: process.env.GATSBY_INFURA_PROJECT_ID || 'xxx'
|
infuraProjectId: process.env.GATSBY_INFURA_PROJECT_ID || 'xxx',
|
||||||
|
marketFeeAddress: process.env.GATSBY_MARKET_FEE_ADDRESS || '0xxxx',
|
||||||
|
marketFeeAmount: process.env.GATSBY_MARKET_FEE_AMOUNT || '0.03' // in %
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
@ -11,12 +11,14 @@ import { initialValues, validationSchema } from '../../../models/FormPublish'
|
|||||||
import { transformPublishFormToMetadata } from './utils'
|
import { transformPublishFormToMetadata } from './utils'
|
||||||
import Preview from './Preview'
|
import Preview from './Preview'
|
||||||
import { MetadataPublishForm } from '../../../@types/MetaData'
|
import { MetadataPublishForm } from '../../../@types/MetaData'
|
||||||
|
import { useSiteMetadata } from '../../../hooks/useSiteMetadata'
|
||||||
|
|
||||||
export default function PublishPage({
|
export default function PublishPage({
|
||||||
content
|
content
|
||||||
}: {
|
}: {
|
||||||
content: { form: FormContent }
|
content: { form: FormContent }
|
||||||
}): ReactElement {
|
}): ReactElement {
|
||||||
|
const { marketFeeAddress, marketFeeAmount } = useSiteMetadata()
|
||||||
const { accountId, ocean } = useOcean()
|
const { accountId, ocean } = useOcean()
|
||||||
const { publish, publishError } = usePublish()
|
const { publish, publishError } = usePublish()
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
@ -48,8 +50,8 @@ export default function PublishPage({
|
|||||||
metadata as any,
|
metadata as any,
|
||||||
tokensToMint.toString(),
|
tokensToMint.toString(),
|
||||||
serviceType,
|
serviceType,
|
||||||
'',
|
marketFeeAddress,
|
||||||
''
|
marketFeeAmount
|
||||||
)
|
)
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'advanced': {
|
case 'advanced': {
|
||||||
|
@ -16,6 +16,8 @@ const query = graphql`
|
|||||||
appConfig {
|
appConfig {
|
||||||
infuraProjectId
|
infuraProjectId
|
||||||
network
|
network
|
||||||
|
marketFeeAddress
|
||||||
|
marketFeeAmount
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user