Revert "Adjust for new naming conventions"

This commit is contained in:
2018-04-15 16:35:31 +00:00
committed by GitHub
parent d2c43b9ef1
commit 399ee27af9
10 changed files with 39 additions and 15 deletions
+9 -1
View File
@@ -25,6 +25,14 @@ export default class Contributor extends Base {
id = ethers.utils.bigNumberify(id);
return this.functions.getContributorById(id)
.then((data) => {
// TODO: remove as soon as the contract provides the id
data.id = id;
// TODO: rename address to account
data.address = data.account;
return data;
})
// Fetch IPFS data if available
.then((data) => {
return Kredits.ipfs.catAndMerge(data, ContributorSerializer.deserialize);
@@ -39,7 +47,7 @@ export default class Contributor extends Base {
.add(json)
.then((ipfsHashAttr) => {
let contributor = [
contributorAttr.account,
contributorAttr.address,
ipfsHashAttr.ipfsHash,
ipfsHashAttr.hashFunction,
ipfsHashAttr.hashSize,
+9 -1
View File
@@ -24,7 +24,15 @@ export default class Operator extends Base {
getById(id) {
id = ethers.utils.bigNumberify(id);
return this.functions.getProposal(id)
return this.functions.proposals(id)
.then((data) => {
// TODO: remove as soon as the contract provides the id
data.id = id;
// TODO: rename creatorAddress to creator
data.creatorAddress = data.creator;
return data;
})
// Fetch IPFS data if available
.then((data) => {
return Kredits.ipfs.catAndMerge(data, ContributionSerializer.deserialize);