mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
cleanup
This commit is contained in:
parent
a7998abb99
commit
3a130c364b
@ -16,7 +16,7 @@ export default function FilesInput(props: InputProps): ReactElement {
|
|||||||
const source = axios.CancelToken.source()
|
const source = axios.CancelToken.source()
|
||||||
|
|
||||||
async function validateUrl() {
|
async function validateUrl() {
|
||||||
// TODO: get the providerUri
|
// TODO: #756 get the providerUri
|
||||||
const providerUri = ''
|
const providerUri = ''
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -50,7 +50,7 @@ function AssetProvider({
|
|||||||
const { networkId } = useWeb3()
|
const { networkId } = useWeb3()
|
||||||
const [isInPurgatory, setIsInPurgatory] = useState(false)
|
const [isInPurgatory, setIsInPurgatory] = useState(false)
|
||||||
const [purgatoryData, setPurgatoryData] = useState<PurgatoryData>()
|
const [purgatoryData, setPurgatoryData] = useState<PurgatoryData>()
|
||||||
const [ddo, setDDO] = useState<any>()
|
const [ddo, setDDO] = useState<DDO>()
|
||||||
const [did, setDID] = useState<string>()
|
const [did, setDID] = useState<string>()
|
||||||
const [metadata, setMetadata] = useState<MetadataMarket>()
|
const [metadata, setMetadata] = useState<MetadataMarket>()
|
||||||
const [title, setTitle] = useState<string>()
|
const [title, setTitle] = useState<string>()
|
||||||
@ -149,7 +149,6 @@ function AssetProvider({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!networkId || !ddo) return
|
if (!networkId || !ddo) return
|
||||||
|
|
||||||
// TODO: remove typing once present in ocean.js' DDO typing
|
|
||||||
const isAssetNetwork = networkId === ddo?.chainId
|
const isAssetNetwork = networkId === ddo?.chainId
|
||||||
setIsAssetNetwork(isAssetNetwork)
|
setIsAssetNetwork(isAssetNetwork)
|
||||||
}, [networkId, ddo])
|
}, [networkId, ddo])
|
||||||
|
@ -7,13 +7,7 @@ import React, {
|
|||||||
ReactNode,
|
ReactNode,
|
||||||
useEffect
|
useEffect
|
||||||
} from 'react'
|
} from 'react'
|
||||||
import {
|
import { Ocean, Logger, Account, ConfigHelperConfig } from '@oceanprotocol/lib'
|
||||||
Ocean,
|
|
||||||
Logger,
|
|
||||||
Account,
|
|
||||||
ConfigHelperConfig,
|
|
||||||
DDO
|
|
||||||
} from '@oceanprotocol/lib'
|
|
||||||
|
|
||||||
import { useWeb3 } from './Web3'
|
import { useWeb3 } from './Web3'
|
||||||
import { getDevelopmentConfig, getOceanConfig } from '../utils/ocean'
|
import { getDevelopmentConfig, getOceanConfig } from '../utils/ocean'
|
||||||
@ -65,7 +59,6 @@ function OceanProvider({ children }: { children: ReactNode }): ReactElement {
|
|||||||
// Initial connection
|
// Initial connection
|
||||||
// -----------------------------------
|
// -----------------------------------
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// TODO: remove DDO typing once ocean.js has it
|
|
||||||
if (!ddo?.chainId) return
|
if (!ddo?.chainId) return
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user