()
| 339 | } |
| 340 | |
| 341 | saveCachedToken() { |
| 342 | if (!this.token) return; |
| 343 | const cache = readCache(); |
| 344 | cache[this.account] = { |
| 345 | token: this.token, |
| 346 | lmid: this.lmid, |
| 347 | expireAt: this.expire ? Date.now() + this.expire * 1000 : 0, |
| 348 | updatedAt: new Date().toISOString(), |
| 349 | }; |
| 350 | writeCache(cache); |
| 351 | } |
| 352 | |
| 353 | removeCachedToken() { |
| 354 | const cache = readCache(); |
no test coverage detected