Automatically refresh lndhub token once a day

This commit is contained in:
Râu Cao
2023-11-22 21:12:24 +01:00
parent 35844b577c
commit 833ab50616
2 changed files with 5 additions and 0 deletions

View File

@@ -56,6 +56,9 @@ export default class Lndhub {
console.warn('Lndhub re-auth failed:', data.message);
return false;
} else {
if (this.accessToken !== data.access_token) {
console.log('Lndhub access token refreshed');
}
this.accessToken = data.access_token;
return true;
}