(credentials: AuthCredentials, encryption: Encryption)
| 215 | } |
| 216 | |
| 217 | async create(credentials: AuthCredentials, encryption: Encryption) { |
| 218 | this.credentials = credentials; |
| 219 | this.encryption = encryption; |
| 220 | this.anonID = encryption.anonID; |
| 221 | this.serverID = parseToken(credentials.token); |
| 222 | await this.#init(); |
| 223 | |
| 224 | // Await settings sync to have fresh settings |
| 225 | await this.settingsSync.awaitQueue(); |
| 226 | |
| 227 | // Await profile sync to have fresh profile |
| 228 | await this.profileSync.awaitQueue(); |
| 229 | |
| 230 | // Await purchases sync to have fresh purchases |
| 231 | await this.purchasesSync.awaitQueue(); |
| 232 | } |
| 233 | |
| 234 | async restore(credentials: AuthCredentials, encryption: Encryption) { |
| 235 | // NOTE: No awaiting anything here, we're restoring from a disk (ie app restarted) |
no test coverage detected