Compare commits

...

1 Commits

Author SHA1 Message Date
a7c497da6a
Return IPFS hash in addContribution() response
Needed in kredits-web. Useful for clients to identify contributions
before knowing their assigned ID.
2019-09-10 12:18:35 +02:00

View File

@ -58,7 +58,10 @@ class Contribution extends Record {
ipfsHashAttr.hashSize,
];
return this.functions.add(...contribution, callOptions);
return this.functions.add(...contribution, callOptions).then(res => {
res.ipfsHash = this.ipfs.encodeHash(ipfsHashAttr);
return res;
});
});
}