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 03ee17f00e - Show all commits

View File

@ -1,6 +1,10 @@
const debug = require('debug')('ipfs-pinner');
const cliProgress = require('cli-progress');
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
class IpfsPinner {
constructor (kredits, options={}) {
this.kredits = kredits;
@ -46,6 +50,9 @@ class IpfsPinner {
await Promise.all(promises);
// Avoid console output race condition with progress bars finishing update
if (this.progressBars) await sleep(1000);
return cids;
}