Merge pull request #28 from 67P/refactor/proposal-ipfs-hash
Handle new IPFS hashes in proposal
This commit was merged in pull request #28.
This commit is contained in:
@@ -161,6 +161,13 @@ export default Service.extend({
|
||||
return this.get('kreditsContract')
|
||||
.then((contract) => contract.invoke('proposals', i))
|
||||
.then(p => {
|
||||
|
||||
let ipfsHash = this.getMultihashFromBytes32({
|
||||
digest: p[6],
|
||||
hashFunction: p[7].toNumber(),
|
||||
size: p[8].toNumber()
|
||||
});
|
||||
|
||||
let proposal = Proposal.create({
|
||||
id : i,
|
||||
creatorAddress : p[0],
|
||||
@@ -169,7 +176,7 @@ export default Service.extend({
|
||||
votesNeeded : p[3].toNumber(),
|
||||
amount : p[4].toNumber(),
|
||||
executed : p[5],
|
||||
ipfsHash : p[6]
|
||||
ipfsHash : ipfsHash
|
||||
});
|
||||
|
||||
if (proposal.get('ipfsHash')) {
|
||||
|
||||
Reference in New Issue
Block a user