Rename Kredits to Organization
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import ethers from 'npm:ethers';
|
||||
import RSVP from 'rsvp';
|
||||
|
||||
import Kredits from '../kredits';
|
||||
import Organization from '../kredits';
|
||||
import ContributorSerializer from '../serializers/contributor';
|
||||
|
||||
import Base from './base';
|
||||
@@ -35,7 +35,7 @@ export default class Contributor extends Base {
|
||||
})
|
||||
// Fetch IPFS data if available
|
||||
.then((data) => {
|
||||
return Kredits.ipfs.catAndMerge(data, ContributorSerializer.deserialize);
|
||||
return Organization.ipfs.catAndMerge(data, ContributorSerializer.deserialize);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ export default class Contributor extends Base {
|
||||
let json = ContributorSerializer.serialize(contributorAttr);
|
||||
// TODO: validate against schema
|
||||
|
||||
return Kredits.ipfs
|
||||
return Organization.ipfs
|
||||
.add(json)
|
||||
.then((ipfsHashAttr) => {
|
||||
let contributor = [
|
||||
@@ -54,7 +54,6 @@ export default class Contributor extends Base {
|
||||
contributorAttr.isCore,
|
||||
];
|
||||
|
||||
console.log('[kredits] addContributor', ...contributor);
|
||||
return this.functions.addContributor(...contributor);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import ethers from 'npm:ethers';
|
||||
import RSVP from 'rsvp';
|
||||
|
||||
import Kredits from '../kredits';
|
||||
import Organization from '../kredits';
|
||||
import ContributionSerializer from '../serializers/contribution';
|
||||
|
||||
import Base from './base';
|
||||
@@ -35,7 +35,7 @@ export default class Operator extends Base {
|
||||
})
|
||||
// Fetch IPFS data if available
|
||||
.then((data) => {
|
||||
return Kredits.ipfs.catAndMerge(data, ContributionSerializer.deserialize);
|
||||
return Organization.ipfs.catAndMerge(data, ContributionSerializer.deserialize);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ export default class Operator extends Base {
|
||||
let json = ContributionSerializer.serialize(proposalAttr);
|
||||
// TODO: validate against schema
|
||||
|
||||
return Kredits.ipfs
|
||||
return Organization.ipfs
|
||||
.add(json)
|
||||
.then((ipfsHashAttr) => {
|
||||
let proposal = [
|
||||
@@ -54,7 +54,6 @@ export default class Operator extends Base {
|
||||
ipfsHashAttr.hashSize,
|
||||
];
|
||||
|
||||
console.log('[kredits] addProposal', ...proposal);
|
||||
return this.functions.addProposal(...proposal);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export { default } from './kredits';
|
||||
export { default } from './organization';
|
||||
|
||||
@@ -13,7 +13,7 @@ function capitalize(word) {
|
||||
return `${first.toUpperCase()}${rest.join('')}`;
|
||||
}
|
||||
|
||||
export default class Kredits {
|
||||
export default class Organization {
|
||||
constructor(provider, signer, addresses) {
|
||||
this.provider = provider;
|
||||
this.signer = signer;
|
||||
@@ -45,7 +45,7 @@ export default class Kredits {
|
||||
|
||||
return RSVP.hash(addresses)
|
||||
.then((addresses) => {
|
||||
return new Kredits(provider, signer, addresses);
|
||||
return new Organization(provider, signer, addresses);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user