mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
fixes
This commit is contained in:
parent
c7d6616874
commit
c9faca8666
@ -1,6 +1,7 @@
|
||||
import { useEffect, useState } from 'react'
|
||||
import { NftFactory } from '@oceanprotocol/lib'
|
||||
import { useWeb3 } from '@context/Web3'
|
||||
import { getOceanConfig } from '@utils/ocean'
|
||||
|
||||
function useNftFactory(): NftFactory {
|
||||
const { web3, chainId } = useWeb3()
|
||||
@ -8,11 +9,8 @@ function useNftFactory(): NftFactory {
|
||||
|
||||
useEffect(() => {
|
||||
if (!web3 || !chainId) return
|
||||
|
||||
const factory = new NftFactory(
|
||||
'0xa15024b732A8f2146423D14209eFd074e61964F3',
|
||||
web3
|
||||
)
|
||||
const config = getOceanConfig(chainId)
|
||||
const factory = new NftFactory(config.erc721FactoryAddress, web3)
|
||||
setNftFactory(factory)
|
||||
}, [web3, chainId])
|
||||
|
||||
|
@ -7,6 +7,7 @@ const cx = classNames.bind(styles)
|
||||
|
||||
export interface BoxSelectionOption {
|
||||
name: string
|
||||
value?: string
|
||||
checked: boolean
|
||||
title: JSX.Element | string
|
||||
icon?: JSX.Element
|
||||
@ -50,7 +51,7 @@ export default function BoxSelection({
|
||||
onChange={(event) => handleChange(event)}
|
||||
{...props}
|
||||
disabled={disabled}
|
||||
value={option.name}
|
||||
value={option.value ? option.value : option.name}
|
||||
name={name}
|
||||
/>
|
||||
<label
|
||||
|
@ -23,6 +23,7 @@ export default function ServicesFields(): ReactElement {
|
||||
const accessTypeOptions = [
|
||||
{
|
||||
name: 'download',
|
||||
value: accessTypeOptionsTitles[0].toLowerCase(),
|
||||
title: 'Download',
|
||||
icon: <IconDownload />,
|
||||
// BoxSelection component is not a Formik component
|
||||
@ -32,6 +33,7 @@ export default function ServicesFields(): ReactElement {
|
||||
},
|
||||
{
|
||||
name: accessTypeOptionsTitles[1].toLowerCase(),
|
||||
value: accessTypeOptionsTitles[1].toLowerCase(),
|
||||
title: accessTypeOptionsTitles[1],
|
||||
icon: <IconCompute />,
|
||||
checked:
|
||||
|
@ -73,7 +73,7 @@ export default function PublishPage({
|
||||
// fee is default 0 for now
|
||||
// TODO: templateIndex is hardcoded for now but this is incorrect, in the future it should be something like 1 for pools, and 2 for fre and free
|
||||
const ercParams: Erc20CreateParams = {
|
||||
templateIndex: 1,
|
||||
templateIndex: values.pricing.type === 'dynamic' ? 1 : 2,
|
||||
minter: accountId,
|
||||
feeManager: accountId,
|
||||
mpFeeAddress: appConfig.marketFeeAddress,
|
||||
@ -136,7 +136,7 @@ export default function PublishPage({
|
||||
baseTokenDecimals: 18,
|
||||
dataTokenDecimals: 18,
|
||||
fixedRate: values.pricing.price,
|
||||
marketFee: 0.1,
|
||||
marketFee: 1e15,
|
||||
withMint: true
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user