diff --git a/lib/main.js b/lib/main.js index 8a6e9e6..e39c95f 100644 --- a/lib/main.js +++ b/lib/main.js @@ -110,8 +110,10 @@ module.exports = class { let oldestId; do { + console.log('getTransactions: fetch from ' + (oldestId || 'start') + '…'); try { rawTransactions = await client.api.payment.list(this.userId, accountId, {older_id: oldestId}); + await this.sleep(); } catch (err) { console.log('getTransactions: got error: ', err.response.data); @@ -150,6 +152,7 @@ module.exports = class { await this.sleep(); } while (!done); + console.log('getTransactions: got', transactions.length, 'transactions'); return transactions; }