MCPcopy
hub / github.com/slopus/happy / create

Method create

packages/happy-app/sources/sync/sync.ts:217–232  ·  view source on GitHub ↗
(credentials: AuthCredentials, encryption: Encryption)

Source from the content-addressed store, hash-verified

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)

Callers 15

InboxView.tsxFile · 0.45
TabBar.tsxFile · 0.45
ShimmerView.tsxFile · 0.45
OAuthView.tsxFile · 0.45
FABWide.tsxFile · 0.45
Avatar.tsxFile · 0.45
ChatHeaderView.tsxFile · 0.45
HomeHeader.tsxFile · 0.45
CommandView.tsxFile · 0.45
CodeView.tsxFile · 0.45

Calls 3

#initMethod · 0.95
parseTokenFunction · 0.90
awaitQueueMethod · 0.45

Tested by

no test coverage detected