MCPcopy Create free account
hub / github.com/Roy3838/Observer / ensurePhoneCode

Method ensurePhoneCode

app/src/utils/settings.ts:290–290  ·  view source on GitHub ↗

The persisted SMS or WhatsApp code, generating and storing one on first use.

(channel: PhoneChannel)

Source from the content-addressed store, hash-verified

288
289 /** The persisted SMS or WhatsApp code, generating and storing one on first use. */
290 public ensurePhoneCode(channel: PhoneChannel): string { return this.ensureCode(this.phoneCodeKey(channel)); }
291
292 /** The persisted SMS or WhatsApp code, or null if one hasn't been generated yet. */
293 public getPhoneCode(channel: PhoneChannel): string | null { return localStorage.getItem(this.phoneCodeKey(channel)); }

Callers 3

defaultPhoneCodeMethod · 0.95
PhoneSetupFunction · 0.80
UserInfoCardFunction · 0.80

Calls 2

ensureCodeMethod · 0.95
phoneCodeKeyMethod · 0.95

Tested by

no test coverage detected