add fix incorrect path on prod build

This commit is contained in:
Barry Gitarts 2019-05-02 14:51:01 -04:00
parent 89b305540e
commit 8c4413c644
2 changed files with 7 additions and 1 deletions

View File

@ -55,7 +55,7 @@
"webpack": "4.28.3",
"worker-loader": "^2.0.0"
},
"homepage": "https://github.com/Giveth/liquidpledging#readme",
"homepage": ".",
"dependencies": {
"@aragon/os": "3.1.9",
"@areknawo/rex": "^2.0.0",

View File

@ -54,6 +54,12 @@ export const uploadToIpfs = async files => {
return `ipfs/${res[0].hash}`
}
export const pinToIpfs = async hash => {
const cid = hash.split('/').slice(-1)[0]
const res = await ipfs.pin.add(cid, { recursive: false })
console.log({res})
}
export const getImageFromIpfs = async (hash, cb) => {
const res = await getFromIpfs(hash)
cb(res)