()
| 130 | } |
| 131 | |
| 132 | saveCachedToken() { |
| 133 | if (!this.token) return; |
| 134 | const cache = readTokenCache(); |
| 135 | cache[this.account] = { |
| 136 | token: this.token, |
| 137 | aiToken: this.aiToken, |
| 138 | expireTime: this.expireTime, |
| 139 | userId: this.userInfo.id || "", |
| 140 | mobile: this.userInfo.mobile || "", |
| 141 | updatedAt: new Date().toISOString(), |
| 142 | }; |
| 143 | writeTokenCache(cache); |
| 144 | } |
| 145 | |
| 146 | removeCachedToken() { |
| 147 | const cache = readTokenCache(); |
no test coverage detected