Pin reimbursement data

This commit is contained in:
Râu Cao 2022-11-01 16:36:58 +01:00
parent 3c02591061
commit 77c2cea4a4
Signed by: raucao
GPG Key ID: 15E65F399D084BA9
1 changed files with 6 additions and 6 deletions

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));