Upgrade for new kredits contracts and RSK #10

Merged
greg merged 13 commits from chore/upgrade_kredits into master 2022-11-02 17:42:39 +00:00
Showing only changes of commit 77c2cea4a4 - Show all commits

View File

@ -18,12 +18,12 @@ class IpfsPinner {
}
async pinAll () {
const contributorHashes = await this._pinAllFromContract(this.kredits.Contributor);
const contributionHashes = await this._pinAllFromContract(this.kredits.Contribution);
// const proposalHashes = await this._pinAllFromContract(this.kredits.Proposal);
const contributorHashes = await this._pinAllFromContract(this.kredits.Contributor);
const contributionHashes = await this._pinAllFromContract(this.kredits.Contribution);
const reimbursementHashes = await this._pinAllFromContract(this.kredits.Reimbursement);
return contributorHashes.concat(contributionHashes);
// .concat(proposalHashes);
return contributorHashes.concat(contributionHashes)
.concat(reimbursementHashes);
}
monitor (callback) {
@ -52,7 +52,7 @@ class IpfsPinner {
const cids = [];
async function loadAndPin (id) {
debug(`Loading ${contract.constructor.name} #${id}`);
debug(`Loading ${contract.constructor.name} #${id}`);
return contract.getData(id).then(data => {
debug(`Pinning ${contract.constructor.name} #${id}`);
return this.ipfsApi.pin(data).then(cid => cids.push(cid));