Skip to content

Commit

Permalink
feat: Log getTransaction calls for debugging purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbo2002 committed Sep 17, 2023
1 parent 9a8e873 commit 2f905f1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -150,6 +152,7 @@ module.exports = class {
await this.sleep();
} while (!done);

console.log('getTransactions: got', transactions.length, 'transactions');
return transactions;
}

Expand Down

0 comments on commit 2f905f1

Please sign in to comment.