Move all metadata to IPFS with proper schemas #16
Reference in New Issue
Block a user
Delete Branch "feature/ipfs-metadata"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This refactors the app to use the new schemas I created for storing/retrieving all metadata in/from IPFS.
Added color-coded hearts for the contribution type:
We're not showing more than the color coding for the kind, as of now, but there's no need to keep this in a branch anymore. It's actually important we get the IPFS doc creation for both contributors and proposals into master asap, so please review!
I hacked in the contribution details as title to be shown on hovering the proposal items. Works like a charm and so useful. :)
Added some notes and questions. Other than that, it looks good.
@@ -1,41 +1,58 @@import Ember from 'ember';I think this is supposed to be
newContributor.urlinstead ofnewContributor.name.Not sure about this, but maybe it makes sense to add
kredits.web3Instanceas dependent key as well? So the property gets recalculated whenkredits.web3Instancechanges. Thinking of that race condition where the user provided web3 is only available after a while.@@ -13,47 +14,52 @@ export default Component.extend({kredits: service(),You should always use a radix parameter of
10withparseInt.@@ -28,3 +29,2 @@// TODOreturn true;return isPresent(this.get('proposal.url'));}),Is this supposed to be
kredits.web3now? Because in theadd-contributorcomponent it's still usingkredits.web3Instance.I think this is missing a
return;after thealertnow, so it doesn't continue trying to save the data when it's invalid.@@ -26,6 +26,9 @@ export default Ember.Service.extend({getFile(hash) {I think you want to
throwthe error here. Otherwise thegetFilePromise will resolve with theerras value instead of being rejected.@@ -28,3 +29,2 @@// TODOreturn true;return isPresent(this.get('proposal.url'));}),Not "now", but in general, yes. I don't know why it's not in the add-contributor component.
@@ -13,47 +14,52 @@ export default Component.extend({kredits: service(),What does that mean?
Yes, totally.
@@ -13,47 +14,52 @@ export default Component.extend({kredits: service(),The second parameter of
parseIntshould always be10if you want it to be parsed as decimal number. So in this case it should beparseInt(this.get('proposal.amount'), 10).Otherwise, in certain situations the number will be interpreted with a different base (e.g. when the number starts with a 0, it will be octal).
@@ -26,6 +26,9 @@ export default Ember.Service.extend({getFile(hash) {Good catch! Pun indubitably intended.
@galfert Thanks. I addressed all comments and asked about the one I don't understand.
You mean the one about
parseInt? I had already answered that one.@@ -13,47 +14,52 @@ export default Component.extend({kredits: service(),I see, thanks.
That was too quick to even notice or get a notification. :)
Added the param.
@@ -1,41 +1,58 @@import Ember from 'ember';I think you missed this one.
I think you missed one comment (see https://github.com/67P/kredits-web/pull/16#discussion_r120913421). The rest looks all good now.
Done.
@@ -28,0 +44,4 @@isValid: computed.and('isValidAddress','isValidName',could we validate these using some json schema validators?
@@ -28,0 +44,4 @@isValid: computed.and('isValidAddress','isValidName',In theory yes (there's e.g.
"format": "uri"), but it'd be much easier here to just have some simple regexp for HTTP URIs imo (which also keeps the build size down).as a note: I thought about somehow generating an ID from within the contract.
I'd prefer that. Until we have it, this is the next-best thing. :)
Thanks everyone!