Return IPFS hash in addContribution() response
Needed in kredits-web. Useful for clients to identify contributions before knowing their assigned ID.
This commit is contained in:
parent
1c1a318ae6
commit
a7c497da6a
@ -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;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user