Pin reimbursement data
This commit is contained in:
parent
3c02591061
commit
77c2cea4a4
@ -18,12 +18,12 @@ class IpfsPinner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async pinAll () {
|
async pinAll () {
|
||||||
const contributorHashes = await this._pinAllFromContract(this.kredits.Contributor);
|
const contributorHashes = await this._pinAllFromContract(this.kredits.Contributor);
|
||||||
const contributionHashes = await this._pinAllFromContract(this.kredits.Contribution);
|
const contributionHashes = await this._pinAllFromContract(this.kredits.Contribution);
|
||||||
// const proposalHashes = await this._pinAllFromContract(this.kredits.Proposal);
|
const reimbursementHashes = await this._pinAllFromContract(this.kredits.Reimbursement);
|
||||||
|
|
||||||
return contributorHashes.concat(contributionHashes);
|
return contributorHashes.concat(contributionHashes)
|
||||||
// .concat(proposalHashes);
|
.concat(reimbursementHashes);
|
||||||
}
|
}
|
||||||
|
|
||||||
monitor (callback) {
|
monitor (callback) {
|
||||||
@ -52,7 +52,7 @@ class IpfsPinner {
|
|||||||
const cids = [];
|
const cids = [];
|
||||||
|
|
||||||
async function loadAndPin (id) {
|
async function loadAndPin (id) {
|
||||||
debug(`Loading ${contract.constructor.name} #${id}`);
|
debug(`Loading ${contract.constructor.name} #${id}`);
|
||||||
return contract.getData(id).then(data => {
|
return contract.getData(id).then(data => {
|
||||||
debug(`Pinning ${contract.constructor.name} #${id}`);
|
debug(`Pinning ${contract.constructor.name} #${id}`);
|
||||||
return this.ipfsApi.pin(data).then(cid => cids.push(cid));
|
return this.ipfsApi.pin(data).then(cid => cids.push(cid));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user