Skip to content

Commit b8caa6f

Browse files
committed
Fix white-label skew copy and debug logs
Replace Edge-branded clock-skew wording with generic phrasing, and gate attestation console.log calls behind DEBUG_VERBOSE_LOGGING so production stays quiet.
1 parent 52196d0 commit b8caa6f

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

src/locales/en_US.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ const strings = {
694694
string_ok_cap: 'OK',
695695
clock_skew_title: 'Device clock is wrong',
696696
clock_skew_message:
697-
"Your device time differs from Edge's servers by more than two minutes. Turn on automatic date & time in your system settings so one-time codes and other time-based features keep working.",
697+
'Your device time differs from our servers by more than two minutes. Turn on automatic date & time in your system settings so one-time codes and other time-based features keep working.',
698698
string_forget: 'Forget',
699699
string_delete: 'Delete',
700700
string_keep: 'Keep',

src/locales/strings/enUS.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@
523523
"string_cancel": "CANCEL",
524524
"string_ok_cap": "OK",
525525
"clock_skew_title": "Device clock is wrong",
526-
"clock_skew_message": "Your device time differs from Edge's servers by more than two minutes. Turn on automatic date & time in your system settings so one-time codes and other time-based features keep working.",
526+
"clock_skew_message": "Your device time differs from our servers by more than two minutes. Turn on automatic date & time in your system settings so one-time codes and other time-based features keep working.",
527527
"string_forget": "Forget",
528528
"string_delete": "Delete",
529529
"string_keep": "Keep",

src/util/attestation.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { NativeModules, Platform } from 'react-native'
22

33
import { showButtonsModal } from '../components/modals/ButtonsModal'
4+
import { ENV } from '../env'
45
import { lstrings } from '../locales/strings'
56
import { monotonicNow } from './monotonicTime'
67
import { fetchInfo } from './network'
@@ -318,7 +319,9 @@ const refreshWithEnrolledKey = async (
318319
throw error
319320
}
320321
// noKey / invalidKey / native signing failure: fall back to full attestation.
321-
console.log('[attestation] assertion unavailable:', String(error))
322+
if (ENV.DEBUG_VERBOSE_LOGGING) {
323+
console.log('[attestation] assertion unavailable:', String(error))
324+
}
322325
return undefined
323326
}
324327

@@ -589,7 +592,9 @@ const runHandshake = (): void => {
589592
lastFailureAt = undefined
590593
consecutiveFailures = 0
591594
cachedToken = freshToken
592-
console.log('[attestation] handshake ok')
595+
if (ENV.DEBUG_VERBOSE_LOGGING) {
596+
console.log('[attestation] handshake ok')
597+
}
593598
scheduleRefresh(freshToken.expiresMono)
594599
})
595600
.catch((error: unknown) => {

0 commit comments

Comments
 (0)