Files
kredits-web/app/models/contributor.js
T
basti e7fa188797 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.
2017-02-18 18:44:14 +08:00

31 lines
640 B
JavaScript

import Ember from 'ember';
export default Ember.Object.extend({
address: null,
github_username: null,
github_uid: null,
ipfsHash: null,
kredits: null,
isCurrentUser: false,
avatarURL: function() {
return `https\:\/\/avatars2.githubusercontent.com/u/${this.get('github_uid')}?v=3&s=128`;
}.property('github_uid'),
serialize() {
return JSON.stringify({
profiles: {
'github.com': {
uid: this.get('github_uid'),
username: this.get('github_username'),
}
// 'wiki.kosmos.org': {
// username: this.get('wiki_username')
// }
}
});
}
});