Store contributor profile data in IPFS

This stores the GitHub username and UID in IPFS, and stores the
resulting IPFS hash in the contract. Now we can remove the GitHub
profile data from the contract entirely.
This commit is contained in:
2017-02-18 18:44:14 +08:00
parent b8ded8e6a8
commit e7fa188797
3 changed files with 31 additions and 12 deletions
+1
View File
@@ -18,6 +18,7 @@ export default Ember.Service.extend({
storeFile(content) {
let ipfs = this.get('ipfs');
return ipfs.add(new ipfs.Buffer(content)).then(res => {
Ember.Logger.debug('[ipfs] stored content in IPFS', content, res[0].hash);
return res[0].hash;
});
},