diff --git a/src/components/projects/CreateProject.jsx b/src/components/projects/CreateProject.jsx index e981994..a1e734e 100644 --- a/src/components/projects/CreateProject.jsx +++ b/src/components/projects/CreateProject.jsx @@ -197,15 +197,14 @@ const SubmissionSection = ({ classes, history }) => { const { title, commitTime } = values const manifest = createJSON(values) const contentHash = await uploadFilesToIpfs(uploads, manifest) + uploadFilesToIpfs(uploads, manifest, true) const args = [title, contentHash, account, 0, hoursToSeconds(commitTime), ZERO_ADDRESS] addProject(...args) .estimateGas({ from: account }) .then(async gas => { addProject(...args) .send({ from: account, gas: gas + 100 }) - .then(res => { - // upload to gateway - uploadFilesToIpfs(uploads, manifest, true) + .then(async res => { pinToGateway(contentHash) console.log({res}) openSnackBar('success', addProjectSucessMsg(res)) diff --git a/src/utils/ipfs.js b/src/utils/ipfs.js index e1d77a3..9c85c41 100644 --- a/src/utils/ipfs.js +++ b/src/utils/ipfs.js @@ -7,7 +7,8 @@ import { getImageType } from './images' const ipfsMatcher = new Matcher().begin().find('ipfs/') export const ipfs = new IPFS() -const ipfsHttp = ipfsClient('test-ipfs.status.im', '2053', { protocol: 'https' }) +//const ipfsHttp = ipfsClient('test-ipfs.status.im', '2053', { protocol: 'https' }) +const ipfsHttp = ipfsClient({ host: 'api.thegraph.com', 'api-path': '/ipfs/api/v0/', protocol: 'https', port: '443' }) window.ipfsHttp = ipfsHttp window.jsIPFS = ipfs