have options for results

pull/5370/head
bunsenstraat 3 years ago committed by davidzagi93@gmail.com
parent 1a5cc9d583
commit aa92f48238
  1. 4
      apps/remix-ide/src/app/files/dgitProvider.js

@ -363,7 +363,7 @@ class DGitProvider extends Plugin {
data.append('pinataMetadata', metadata)
const url = 'https://api.pinata.cloud/pinning/pinFileToIPFS'
try {
await axios
const result = await axios
.post(url, data, {
maxBodyLength: 'Infinity',
headers: {
@ -373,7 +373,7 @@ class DGitProvider extends Plugin {
}
})
// also commit to remix IPFS for availability after pinning to Pinata
return await this.export(this.remixIPFS)
return await this.export(this.remixIPFS) || result.data.IpfsHash
} catch (error) {
throw new Error(error)
}

Loading…
Cancel
Save