mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
api port tweaks
This commit is contained in:
parent
8b31257837
commit
4920bae0fa
@ -8,9 +8,9 @@ let ipfsMessage = ''
|
||||
let ipfsVersion = ''
|
||||
|
||||
export interface IpfsConfig {
|
||||
protocol: string
|
||||
host: string
|
||||
port: string
|
||||
protocol: string
|
||||
}
|
||||
|
||||
export default function useIpfsApi(config: IpfsConfig) {
|
||||
|
@ -10,11 +10,13 @@ import Form from './Form'
|
||||
const { hostname, port, protocol } = new URL(ipfsNodeUri)
|
||||
|
||||
const ipfsConfig: IpfsConfig = {
|
||||
protocol: protocol.replace(':', ''),
|
||||
host: hostname,
|
||||
port,
|
||||
protocol: protocol.replace(':', '')
|
||||
port: port || '443'
|
||||
}
|
||||
|
||||
console.log(ipfsConfig)
|
||||
|
||||
export default function Ipfs({ addFile }: { addFile(url: string): void }) {
|
||||
const { ipfs, isIpfsReady, ipfsError, ipfsMessage } = useIpfsApi(ipfsConfig)
|
||||
const [loading, setLoading] = useState(false)
|
||||
|
Loading…
Reference in New Issue
Block a user