diff --git a/lib/lndhub.js b/lib/lndhub.js index 60cf0c1..4eb18ff 100644 --- a/lib/lndhub.js +++ b/lib/lndhub.js @@ -22,7 +22,7 @@ export default class Lndhub { async handleErroredRequest (result, retryFunction, args=[]) { console.warn('API request failed:', result.message); if (result.code === 1) { - return this.reauth().then(connected => { + return this.reauth().bind(this).then(connected => { if (connected) { console.warn('Lndhub reconnected, trying again...'); return this[retryFunction](...args);