@bsv/expo-wallet-toolbox 0.25.1 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/core/context/WalletContext.tsx +3 -1
  3. package/core/i18n/translations.tsx +221 -36
  4. package/core/identity/handleRegistry/client.ts +110 -16
  5. package/core/identity/handleRegistry/registration.ts +115 -17
  6. package/core/profiles/profileStore.ts +4 -1
  7. package/core/services/groupSpendingLimit.ts +26 -0
  8. package/core/services/signingPermissionPolicy.ts +14 -8
  9. package/core/services/vault/ceremony.ts +13 -0
  10. package/core/services/vault/ceremonyHost.ts +58 -0
  11. package/core/services/vault/failedVaultSpend.ts +40 -0
  12. package/core/services/vault/outputAuthority.ts +13 -6
  13. package/core/services/vault/transfers.ts +56 -12
  14. package/core/storage/encryptedDbImage.ts +11 -2
  15. package/core/theme/tokens.ts +26 -12
  16. package/package.json +2 -1
  17. package/ui/components/QRScanner.tsx +24 -22
  18. package/ui/components/pay/MessageBoxConfig.tsx +10 -16
  19. package/ui/components/pay/NearbyAdvisoryModal.tsx +6 -13
  20. package/ui/components/pay/NearbyFlow.tsx +72 -35
  21. package/ui/components/pay/PayForm.tsx +27 -19
  22. package/ui/components/pay/PaymentSuccessOverlay.tsx +8 -6
  23. package/ui/components/pay/UniversalSend.tsx +4 -1
  24. package/ui/components/ui/AlertCard.tsx +3 -2
  25. package/ui/components/ui/BalancedText.tsx +117 -0
  26. package/ui/components/ui/ErrorBoundary.tsx +31 -14
  27. package/ui/components/ui/GroupedList.tsx +28 -22
  28. package/ui/components/ui/ListRow.tsx +126 -35
  29. package/ui/components/ui/PermissionSheet.tsx +31 -24
  30. package/ui/components/ui/PresenceRow.tsx +15 -23
  31. package/ui/components/ui/Sheet.tsx +11 -17
  32. package/ui/components/ui/Toast.tsx +13 -17
  33. package/ui/components/vault/EnrollWizard.tsx +446 -196
  34. package/ui/components/vault/KeyChooser.tsx +7 -20
  35. package/ui/components/vault/VaultCeremonySheet.tsx +44 -36
  36. package/ui/components/wallet/AmountInput.tsx +11 -17
  37. package/ui/components/wallet/BiometricAdvisoryModal.tsx +13 -17
  38. package/ui/index.ts +1 -1
  39. package/ui/screens/TrustScreen.tsx +49 -61
  40. package/ui/screens/VaultScreen.tsx +99 -60
  41. package/ui/screens/VaultTransferScreen.tsx +34 -27
  42. package/ui/screens/WalletCheckScreen.tsx +25 -24
  43. package/ui/screens/WalletConfigScreen.tsx +66 -72
@@ -10,25 +10,17 @@
10
10
  */
11
11
  import React from 'react'
12
12
  import { StyleSheet, Text, View } from 'react-native'
13
+ import { Circle, CircleDot } from 'lucide-react-native'
13
14
  import PressableScale from '../ui/PressableScale'
14
15
  import { useTheme, spacing, radii, typography, type VaultKeyRecord } from '@bsv/expo-wallet-toolbox'
15
16
 
16
17
  /**
17
- * @expo/vector-icons' index barrel re-exports every icon set (AntDesign,
18
- * etc.), one of which reaches expo-font -> expo-asset -- untransformed ESM
19
- * that Jest cannot parse when eagerly pulled in via the `ui` package barrel.
20
- * Loaded lazily, only when actually rendering, same pattern as this
21
- * package's other native-module-boundary fixes (expo-router, expo-blur).
18
+ * lucide, the family this app draws every other glyph from (its settings rows,
19
+ * its headers, its sheets). Imported at module scope, unlike
20
+ * @expo/vector-icons: lucide-react-native ships a CJS entry for `require`, so
21
+ * it needs no transform and reaches no native module at import time, which is
22
+ * what this package's lazy icon loads exist to avoid.
22
23
  */
23
- type IoniconsComponent = typeof import('@expo/vector-icons').Ionicons
24
- let ioniconsComponent: IoniconsComponent | undefined
25
- function loadIonicons(): IoniconsComponent {
26
- if (!ioniconsComponent) {
27
- // eslint-disable-next-line @typescript-eslint/no-require-imports
28
- ioniconsComponent = require('@expo/vector-icons').Ionicons as IoniconsComponent
29
- }
30
- return ioniconsComponent
31
- }
32
24
 
33
25
  /** The one display form of a vault key: `nickname · …serialTail4`. */
34
26
  export function vaultKeyLabel(k: { nickname: string; serial: string }): string {
@@ -49,7 +41,6 @@ export const KeyChooser: React.FC<{
49
41
  onSelect: (serial: string) => void
50
42
  }> = ({ keys, selected, onSelect }) => {
51
43
  const { colors } = useTheme()
52
- const Ionicons = loadIonicons()
53
44
  return (
54
45
  <View style={[styles.list, { backgroundColor: colors.backgroundElevated, borderColor: colors.separator }]}>
55
46
  {keys.map((k, i) => {
@@ -70,11 +61,7 @@ export const KeyChooser: React.FC<{
70
61
  }
71
62
  ]}
72
63
  >
73
- <Ionicons
74
- name={on ? 'radio-button-on' : 'radio-button-off'}
75
- size={22}
76
- color={on ? colors.accent : colors.textTertiary}
77
- />
64
+ {on ? <CircleDot size={20} color={colors.accent} /> : <Circle size={20} color={colors.textTertiary} />}
78
65
  <Text style={[styles.label, { color: colors.textPrimary }]} numberOfLines={1}>
79
66
  {vaultKeyLabel(k)}
80
67
  </Text>
@@ -16,6 +16,18 @@
16
16
  */
17
17
  import React, { useEffect, useRef, useState } from 'react'
18
18
  import { View, Text, StyleSheet, TextInput, ActivityIndicator, Platform } from 'react-native'
19
+ import type { HardwareKeyArtComponent } from './EnrollWizard'
20
+ import {
21
+ CircleAlert,
22
+ Cpu,
23
+ FingerprintPattern,
24
+ Grid3x3,
25
+ Lock,
26
+ LockOpen,
27
+ RefreshCw,
28
+ Send,
29
+ type LucideIcon
30
+ } from 'lucide-react-native'
19
31
  import Animated, {
20
32
  useSharedValue,
21
33
  useAnimatedStyle,
@@ -43,49 +55,40 @@ import {
43
55
  type CeremonyPhase,
44
56
  type VaultErrorCode
45
57
  } from '@bsv/expo-wallet-toolbox'
58
+ import { BalancedText } from '../ui/BalancedText'
46
59
 
47
60
  const t = (k: string, opts?: Record<string, unknown>) => i18n.t(k, opts) as string
48
61
 
49
62
  /**
50
- * @expo/vector-icons' index barrel re-exports every icon set (AntDesign,
51
- * etc.), one of which reaches expo-font -> expo-asset -- untransformed ESM
52
- * that Jest cannot parse when eagerly pulled in via the `ui` package barrel.
53
- * Ionicons is loaded lazily, only when actually rendering, same pattern as
54
- * this package's other native-module-boundary fixes (expo-router, expo-blur).
63
+ * lucide, the family this app draws every other glyph from (its settings rows,
64
+ * its headers, its sheets). Imported at module scope, unlike
65
+ * @expo/vector-icons: lucide-react-native ships a CJS entry for `require`, so
66
+ * it needs no transform and reaches no native module at import time, which is
67
+ * what this package's lazy icon loads exist to avoid.
55
68
  */
56
- type IoniconsComponent = typeof import('@expo/vector-icons').Ionicons
57
- let ioniconsComponent: IoniconsComponent | undefined
58
- function loadIonicons(): IoniconsComponent {
59
- if (!ioniconsComponent) {
60
- // eslint-disable-next-line @typescript-eslint/no-require-imports
61
- ioniconsComponent = require('@expo/vector-icons').Ionicons as IoniconsComponent
62
- }
63
- return ioniconsComponent
64
- }
65
69
 
66
70
  /** Swallows the sheet's dismiss while work is in flight — `Sheet` requires an
67
71
  * onClose, and cancelling mid-operation is the thing we are preventing. */
68
72
  const noop = (): void => {}
69
73
 
70
- const PhaseIcon: Record<CeremonyPhase, keyof IoniconsComponent['glyphMap']> = {
71
- idle: 'lock-closed',
72
- 'waiting-for-key': 'hardware-chip-outline',
73
- connecting: 'sync-outline',
74
- 'pin-entry': 'keypad-outline',
75
- 'awaiting-touch': 'finger-print-outline',
76
- preparing: 'lock-open-outline',
77
- broadcasting: 'paper-plane-outline',
78
- armed: 'lock-open',
79
- error: 'alert-circle-outline'
74
+ const PhaseIcon: Record<CeremonyPhase, LucideIcon> = {
75
+ idle: Lock,
76
+ 'waiting-for-key': Cpu,
77
+ connecting: RefreshCw,
78
+ 'pin-entry': Grid3x3,
79
+ 'awaiting-touch': FingerprintPattern,
80
+ preparing: LockOpen,
81
+ broadcasting: Send,
82
+ armed: LockOpen,
83
+ error: CircleAlert
80
84
  }
81
85
 
82
- export const VaultCeremonySheet: React.FC = () => {
86
+ export const VaultCeremonySheet: React.FC<{ keyArt?: HardwareKeyArtComponent }> = ({ keyArt: KeyArt }) => {
83
87
  const { colors } = useTheme()
84
88
  const { state, submitPin, cancel, retry } = useVault()
85
89
  const reducedMotion = useReducedMotion()
86
90
  const [pin, setPin] = useState('')
87
91
  const [keyNames, setKeyNames] = useState('')
88
- const Ionicons = loadIonicons()
89
92
 
90
93
  const phase = state.phase
91
94
  // 'armed' stays hidden: it persists for the whole retention window, so
@@ -204,6 +207,9 @@ export const VaultCeremonySheet: React.FC = () => {
204
207
  })()
205
208
 
206
209
  const iconColor = phase === 'error' ? colors.error : colors.accent
210
+ const PhaseGlyph = PhaseIcon[phase]
211
+ // The two phases that ask for the key itself. `awaiting-touch` is the blink.
212
+ const showKey = KeyArt && (phase === 'waiting-for-key' || phase === 'awaiting-touch')
207
213
 
208
214
  return (
209
215
  <Sheet
@@ -220,13 +226,15 @@ export const VaultCeremonySheet: React.FC = () => {
220
226
  }}
221
227
  >
222
228
  <View style={styles.body}>
223
- {reason ? <Text style={[styles.reason, { color: colors.textSecondary }]}>{reason}</Text> : null}
229
+ {reason ? <BalancedText style={[styles.reason, { color: colors.textSecondary }]}>{reason}</BalancedText> : null}
224
230
 
225
231
  <Animated.View style={[styles.iconWrap, { backgroundColor: colors.backgroundSecondary }, pulseStyle]}>
226
232
  {phase === 'connecting' || busy ? (
227
233
  <ActivityIndicator color={iconColor} />
234
+ ) : showKey && KeyArt ? (
235
+ <KeyArt waiting={phase === 'awaiting-touch'} size={104} />
228
236
  ) : (
229
- <Ionicons name={PhaseIcon[phase]} size={40} color={iconColor} />
237
+ <PhaseGlyph size={36} color={iconColor} />
230
238
  )}
231
239
  </Animated.View>
232
240
 
@@ -237,9 +245,9 @@ export const VaultCeremonySheet: React.FC = () => {
237
245
  this is what the user sees as it dismisses and before the next tap. */}
238
246
  {betweenBatches && progress && (
239
247
  <>
240
- <Text style={[styles.subtitle, { color: colors.textSecondary }]}>
248
+ <BalancedText style={[styles.subtitle, { color: colors.textSecondary }]}>
241
249
  {t('vault_nfc_sign_batch', { b: batchIndex, n: batches })}
242
- </Text>
250
+ </BalancedText>
243
251
  <Text style={[styles.hint, { color: colors.textSecondary }]}>
244
252
  {t('vault_sign_progress', { signed: progress.signed, total: progress.total })}
245
253
  </Text>
@@ -249,22 +257,22 @@ export const VaultCeremonySheet: React.FC = () => {
249
257
  {/* The whole point of the busy phases: say the work is real and say
250
258
  not to leave. While signatures are being gathered, say how many. */}
251
259
  {busy && (
252
- <Text style={[styles.subtitle, { color: colors.textSecondary }]}>
260
+ <BalancedText style={[styles.subtitle, { color: colors.textSecondary }]}>
253
261
  {phase === 'broadcasting'
254
262
  ? t('vault_sending_sub')
255
263
  : progress
256
264
  ? t('vault_sign_progress', { signed: progress.signed, total: progress.total })
257
265
  : t('vault_unlocking_sub')}
258
- </Text>
266
+ </BalancedText>
259
267
  )}
260
268
 
261
269
  {phase === 'awaiting-touch' && <TouchCountdown color={colors.accent} trackColor={colors.backgroundSecondary} />}
262
270
 
263
271
  {phase === 'pin-entry' && (
264
272
  <>
265
- <Text style={[styles.subtitle, { color: colors.textSecondary }]}>
273
+ <BalancedText style={[styles.subtitle, { color: colors.textSecondary }]}>
266
274
  {nfc ? t('vault_pin_sub_nfc') : t('vault_pin_sub_usb')}
267
- </Text>
275
+ </BalancedText>
268
276
  <TextInput
269
277
  ref={pinInputRef}
270
278
  style={[styles.pin, { color: colors.textPrimary, backgroundColor: colors.backgroundSecondary }]}
@@ -303,11 +311,11 @@ export const VaultCeremonySheet: React.FC = () => {
303
311
  )}
304
312
 
305
313
  {phase === 'error' && errCode === 'pin-invalid' && (
306
- <Text style={[styles.subtitle, { color: colors.textSecondary }]}>
314
+ <BalancedText style={[styles.subtitle, { color: colors.textSecondary }]}>
307
315
  {typeof state.error?.retriesLeft === 'number'
308
316
  ? t('vault_pin_invalid_retry', { count: state.error.retriesLeft })
309
317
  : t('vault_pin_invalid_retry_generic')}
310
- </Text>
318
+ </BalancedText>
311
319
  )}
312
320
 
313
321
  {phase === 'error' && (
@@ -20,21 +20,16 @@ import {
20
20
  import { parseTokenAmount, tokenAmountInputText, tokenAmountMask, tokenUnitsFromField } from '../../tokenFormat'
21
21
 
22
22
  /**
23
- * @expo/vector-icons' index barrel re-exports every icon set (AntDesign,
24
- * etc.), one of which reaches expo-font -> expo-asset -- untransformed ESM
25
- * that Jest cannot parse when eagerly pulled in via the `ui` package barrel.
26
- * Ionicons is loaded lazily, only when actually rendering, same pattern as
27
- * this package's other native-module-boundary fixes (expo-router, expo-blur).
23
+ * lucide, like every other glyph this app draws. Imported at module scope
24
+ * rather than behind a lazy loader: what had to be deferred is
25
+ * @expo/vector-icons' index barrel, which re-exports every icon set and so
26
+ * reaches expo-font -> expo-asset as untransformed ESM; nothing here pulls
27
+ * that barrel in any more. lucide publishes both module formats and Jest
28
+ * resolves the ESM one, so the app pins this name to lucide's CJS entry in
29
+ * jest.moduleNameMapper (package.json), as it already does for its other
30
+ * ESM-only dependencies.
28
31
  */
29
- type IoniconsComponent = typeof import('@expo/vector-icons').Ionicons
30
- let ioniconsComponent: IoniconsComponent | undefined
31
- function loadIonicons(): IoniconsComponent {
32
- if (!ioniconsComponent) {
33
- // eslint-disable-next-line @typescript-eslint/no-require-imports
34
- ioniconsComponent = require('@expo/vector-icons').Ionicons as IoniconsComponent
35
- }
36
- return ioniconsComponent
37
- }
32
+ import { Wallet, X } from 'lucide-react-native'
38
33
 
39
34
  export const SEND_MAX_VALUE = '2099999999999999'
40
35
 
@@ -102,7 +97,6 @@ export const AmountInput: React.FC<AmountInputProps> = ({
102
97
  const { settings } = useWallet()
103
98
  const { satoshisPerUSD, usdToFiat = {} } = useContext(ExchangeRateContext)
104
99
  const reducedMotion = useReducedMotion()
105
- const Ionicons = loadIonicons()
106
100
 
107
101
  const currency = settings?.currency || 'BSV'
108
102
  // ONE conjunction, and it is what keeps three denominations from colliding:
@@ -199,7 +193,7 @@ export const AmountInput: React.FC<AmountInputProps> = ({
199
193
  return (
200
194
  <View style={[styles.row, { backgroundColor: colors.backgroundSecondary, borderColor: colors.accent }]}>
201
195
  <View style={styles.sendMaxDisplay}>
202
- <Ionicons name="wallet-outline" size={18} color={colors.accent} />
196
+ <Wallet size={18} color={colors.accent} />
203
197
  <Text style={[styles.sendMaxLabel, { color: colors.accent }]}>{t(maxLabelKey)}</Text>
204
198
  </View>
205
199
  <TouchableOpacity
@@ -209,7 +203,7 @@ export const AmountInput: React.FC<AmountInputProps> = ({
209
203
  }}
210
204
  style={[styles.clearButton, { backgroundColor: colors.fill }]}
211
205
  >
212
- <Ionicons name="close" size={16} color={colors.accent} />
206
+ <X size={16} color={colors.accent} />
213
207
  </TouchableOpacity>
214
208
  </View>
215
209
  )
@@ -16,24 +16,21 @@ import React from 'react'
16
16
  import { ActivityIndicator, Modal, Platform, Pressable, StyleSheet, Text, View } from 'react-native'
17
17
  import { useTheme, spacing, radii, typography, i18n } from '@bsv/expo-wallet-toolbox'
18
18
  import PressableScale from '../ui/PressableScale'
19
+ import { BalancedText } from '../ui/BalancedText'
19
20
 
20
21
  const t = (k: string, o?: Record<string, unknown>) => i18n.t(k, o) as string
21
22
 
22
23
  /**
23
- * @expo/vector-icons' index barrel re-exports every icon set, one of which
24
- * reaches expo-font -> expo-asset -- untransformed ESM Jest cannot parse
25
- * when eagerly pulled in via the `ui` package barrel. Loaded lazily, same
26
- * pattern as this package's other native-module-boundary fixes.
24
+ * lucide, like every other glyph this app draws. Imported at module scope
25
+ * rather than behind a lazy loader: what had to be deferred is
26
+ * @expo/vector-icons' index barrel, which re-exports every icon set and so
27
+ * reaches expo-font -> expo-asset as untransformed ESM; nothing here pulls
28
+ * that barrel in any more. lucide publishes both module formats and Jest
29
+ * resolves the ESM one, so the app pins this name to lucide's CJS entry in
30
+ * jest.moduleNameMapper (package.json), as it already does for its other
31
+ * ESM-only dependencies.
27
32
  */
28
- type IoniconsComponent = typeof import('@expo/vector-icons').Ionicons
29
- let ioniconsComponent: IoniconsComponent | undefined
30
- function loadIonicons(): IoniconsComponent {
31
- if (!ioniconsComponent) {
32
- // eslint-disable-next-line @typescript-eslint/no-require-imports
33
- ioniconsComponent = require('@expo/vector-icons').Ionicons as IoniconsComponent
34
- }
35
- return ioniconsComponent
36
- }
33
+ import { Fingerprint } from 'lucide-react-native'
37
34
 
38
35
  export const BiometricAdvisoryModal: React.FC<{
39
36
  visible: boolean
@@ -53,7 +50,6 @@ export const BiometricAdvisoryModal: React.FC<{
53
50
  onContinue: () => void
54
51
  }> = ({ visible, loading = false, degraded = false, onCancel, onContinue }) => {
55
52
  const { colors } = useTheme()
56
- const Ionicons = loadIonicons()
57
53
 
58
54
  if (!visible) return null
59
55
 
@@ -77,12 +73,12 @@ export const BiometricAdvisoryModal: React.FC<{
77
73
  />
78
74
  <View style={[styles.card, { backgroundColor: colors.sheetBackground, borderColor: colors.separator }]}>
79
75
  <View style={[styles.heroIcon, { backgroundColor: colors.fillTertiary }]}>
80
- <Ionicons name="finger-print" size={28} color={colors.accent} />
76
+ <Fingerprint size={28} color={colors.accent} />
81
77
  </View>
82
78
  <Text style={[styles.title, { color: colors.textPrimary }]}>{t('biometric_advisory_title')}</Text>
83
- <Text style={[styles.body, { color: colors.textSecondary }]}>
79
+ <BalancedText style={[styles.body, { color: colors.textSecondary }]}>
84
80
  {t(degraded ? 'biometric_advisory_body_degraded' : 'biometric_advisory_body')}
85
- </Text>
81
+ </BalancedText>
86
82
 
87
83
  <PressableScale
88
84
  haptic="confirm"
package/ui/index.ts CHANGED
@@ -124,7 +124,7 @@ export {
124
124
  // app-shell level (app/_layout.tsx) alongside PermissionSheet/ToastHost above.
125
125
  // The 1-of-N YubiKey vault has no phrase path: PassphraseField,
126
126
  // PhraseBackupSheet and VaultRecoverScreen are gone (spec §3.5).
127
- export { EnrollWizard } from './components/vault/EnrollWizard'
127
+ export { EnrollWizard, type HardwareKeyArtComponent } from './components/vault/EnrollWizard'
128
128
  export { KeyChooser, vaultKeyLabel } from './components/vault/KeyChooser'
129
129
  export { vaultErrorCopy, RETRYABLE_VAULT_ERRORS, type VaultErrorParams } from './components/vault/vaultErrorCopy'
130
130
  export { BackupReminderSheet } from './components/wallet/BackupReminderSheet'
@@ -2,6 +2,21 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'
2
2
  import { View, Text, StyleSheet, ScrollView, TextInput, TouchableOpacity, Modal, ActivityIndicator } from 'react-native'
3
3
  import type { StyleProp, ViewStyle } from 'react-native'
4
4
  import { SvgUri } from 'react-native-svg'
5
+ import {
6
+ ArrowLeft,
7
+ ChevronDown,
8
+ ChevronUp,
9
+ FileText,
10
+ Globe,
11
+ Image as ImageGlyph,
12
+ KeyRound,
13
+ Plus,
14
+ Search,
15
+ ShieldCheck,
16
+ Tag,
17
+ UserRound,
18
+ X
19
+ } from 'lucide-react-native'
5
20
  import { useSafeAreaInsets } from 'react-native-safe-area-context'
6
21
  import { useTranslation } from 'react-i18next'
7
22
  // Same deep path WalletContext uses: the package root does not re-export the
@@ -15,21 +30,12 @@ import { showAlert } from '../components/ui/AlertCard'
15
30
  import { haptics, useTheme, spacing, radii, typography, useWallet } from '@bsv/expo-wallet-toolbox'
16
31
 
17
32
  /**
18
- * @expo/vector-icons' index barrel re-exports every icon set (AntDesign,
19
- * etc.), one of which reaches expo-font -> expo-asset -- untransformed ESM
20
- * that Jest cannot parse when eagerly pulled in via the `ui` package barrel.
21
- * Ionicons is loaded lazily, only when actually rendering, same pattern as
22
- * this package's other native-module-boundary fixes (expo-router, expo-blur).
33
+ * lucide, the family this app draws every other glyph from (its settings rows,
34
+ * its headers, its sheets). Imported at module scope, unlike
35
+ * @expo/vector-icons: lucide-react-native ships a CJS entry for `require`, so
36
+ * it needs no transform and reaches no native module at import time, which is
37
+ * what this package's lazy icon loads exist to avoid.
23
38
  */
24
- type IoniconsComponent = typeof import('@expo/vector-icons').Ionicons
25
- let ioniconsComponent: IoniconsComponent | undefined
26
- function loadIonicons(): IoniconsComponent {
27
- if (!ioniconsComponent) {
28
- // eslint-disable-next-line @typescript-eslint/no-require-imports
29
- ioniconsComponent = require('@expo/vector-icons').Ionicons as IoniconsComponent
30
- }
31
- return ioniconsComponent
32
- }
33
39
 
34
40
  /**
35
41
  * expo-image's package entry is raw TypeScript (`main: src/index.ts`), which
@@ -246,7 +252,6 @@ export function TrustScreen() {
246
252
  const { colors } = useTheme()
247
253
  const insets = useSafeAreaInsets()
248
254
  const { router } = loadExpoRouter()
249
- const Ionicons = loadIonicons()
250
255
 
251
256
  const { settings, updateSettings } = useWallet()
252
257
 
@@ -340,7 +345,9 @@ export function TrustScreen() {
340
345
  {/* Header */}
341
346
  <View style={[styles.header, { borderBottomColor: colors.separator }]}>
342
347
  <TouchableOpacity onPress={() => router.back()} style={styles.backButton}>
343
- <Ionicons name="chevron-back" size={24} color={colors.textSecondary} />
348
+ <View style={[styles.headerBackWell, { backgroundColor: colors.surfaceSunken }]}>
349
+ <ArrowLeft size={16} color={colors.textPrimary} />
350
+ </View>
344
351
  </TouchableOpacity>
345
352
  <Text style={[styles.headerTitle, { color: colors.textPrimary }]}>{t('trust_network')}</Text>
346
353
  <View style={styles.backButton} />
@@ -365,7 +372,7 @@ export function TrustScreen() {
365
372
  { borderBottomWidth: StyleSheet.hairlineWidth, borderBottomColor: colors.separator }
366
373
  ]}
367
374
  >
368
- <Ionicons name="search" size={16} color={colors.textSecondary} style={{ marginRight: spacing.sm }} />
375
+ <Search size={16} color={colors.textSecondary} style={{ marginRight: spacing.sm }} />
369
376
  <TextInput
370
377
  style={[styles.searchInput, { color: colors.textPrimary }]}
371
378
  placeholder={t('search')}
@@ -416,16 +423,16 @@ export function TrustScreen() {
416
423
  <View style={styles.actions}>
417
424
  {!isFirst && !isSearching && (
418
425
  <TouchableOpacity onPress={() => onMoveUp(item.identityKey)} style={styles.actionBtn}>
419
- <Ionicons name="chevron-up" size={18} color={colors.textSecondary} />
426
+ <ChevronUp size={16} color={colors.textSecondary} />
420
427
  </TouchableOpacity>
421
428
  )}
422
429
  {!isLast && !isSearching && (
423
430
  <TouchableOpacity onPress={() => onMoveDown(item.identityKey)} style={styles.actionBtn}>
424
- <Ionicons name="chevron-down" size={18} color={colors.textSecondary} />
431
+ <ChevronDown size={16} color={colors.textSecondary} />
425
432
  </TouchableOpacity>
426
433
  )}
427
434
  <TouchableOpacity onPress={() => onRemove(item.identityKey)} style={styles.actionBtn}>
428
- <Ionicons name="close" size={18} color={colors.error} />
435
+ <X size={16} color={colors.error} />
429
436
  </TouchableOpacity>
430
437
  </View>
431
438
  </View>
@@ -442,7 +449,7 @@ export function TrustScreen() {
442
449
  ]}
443
450
  onPress={() => setShowAdd(true)}
444
451
  >
445
- <Ionicons name="add" size={18} color={colors.accent} style={{ marginRight: spacing.sm }} />
452
+ <Plus size={16} color={colors.accent} style={{ marginRight: spacing.sm }} />
446
453
  <Text style={[styles.addProviderText, { color: colors.accent }]}>{t('add_provider')}</Text>
447
454
  </TouchableOpacity>
448
455
  </GroupedSection>
@@ -510,7 +517,6 @@ function AddProviderModal({
510
517
  colors: any
511
518
  }) {
512
519
  const { t } = useTranslation()
513
- const Ionicons = loadIonicons()
514
520
  const [advanced, setAdvanced] = useState(false)
515
521
  const [domain, setDomain] = useState('')
516
522
  const [name, setName] = useState('')
@@ -620,7 +626,7 @@ function AddProviderModal({
620
626
  <View style={[styles.modalHeader]}>
621
627
  <Text style={[styles.modalTitle, { color: colors.textPrimary }]}>{t('add_provider')}</Text>
622
628
  <TouchableOpacity onPress={onClose}>
623
- <Ionicons name="close" size={20} color={colors.textSecondary} />
629
+ <X size={16} color={colors.textSecondary} />
624
630
  </TouchableOpacity>
625
631
  </View>
626
632
 
@@ -630,12 +636,7 @@ function AddProviderModal({
630
636
  Enter the domain name for the provider you&apos;d like to add.
631
637
  </Text>
632
638
  <View style={[styles.inputRow, { borderColor: colors.separator, backgroundColor: colors.fillTertiary }]}>
633
- <Ionicons
634
- name="globe-outline"
635
- size={16}
636
- color={colors.textSecondary}
637
- style={{ marginRight: spacing.sm }}
638
- />
639
+ <Globe size={16} color={colors.textSecondary} style={{ marginRight: spacing.sm }} />
639
640
  <TextInput
640
641
  placeholder="trustedentity.com"
641
642
  placeholderTextColor={colors.textSecondary}
@@ -658,7 +659,7 @@ function AddProviderModal({
658
659
  onPress={handleDomainSubmit}
659
660
  style={[styles.primaryBtn, { backgroundColor: colors.accent }]}
660
661
  >
661
- <Ionicons name="document-text-outline" size={16} color={colors.background} />
662
+ <FileText size={16} color={colors.background} />
662
663
  <Text style={[styles.primaryBtnText, { color: colors.background }]}>{t('get_provider_details')}</Text>
663
664
  </TouchableOpacity>
664
665
  )}
@@ -671,12 +672,7 @@ function AddProviderModal({
671
672
 
672
673
  {/* Name */}
673
674
  <View style={[styles.inputRow, { borderColor: colors.separator, backgroundColor: colors.fillTertiary }]}>
674
- <Ionicons
675
- name="person-outline"
676
- size={16}
677
- color={colors.textSecondary}
678
- style={{ marginRight: spacing.sm }}
679
- />
675
+ <UserRound size={16} color={colors.textSecondary} style={{ marginRight: spacing.sm }} />
680
676
  <TextInput
681
677
  placeholder="Entity Name"
682
678
  placeholderTextColor={colors.textSecondary}
@@ -693,12 +689,7 @@ function AddProviderModal({
693
689
 
694
690
  {/* Icon */}
695
691
  <View style={[styles.inputRow, { borderColor: colors.separator, backgroundColor: colors.fillTertiary }]}>
696
- <Ionicons
697
- name="image-outline"
698
- size={16}
699
- color={colors.textSecondary}
700
- style={{ marginRight: spacing.sm }}
701
- />
692
+ <ImageGlyph size={16} color={colors.textSecondary} style={{ marginRight: spacing.sm }} />
702
693
  <TextInput
703
694
  placeholder="https://trustedentity.com/icon.png"
704
695
  placeholderTextColor={colors.textSecondary}
@@ -717,12 +708,7 @@ function AddProviderModal({
717
708
 
718
709
  {/* Public key */}
719
710
  <View style={[styles.inputRow, { borderColor: colors.separator, backgroundColor: colors.fillTertiary }]}>
720
- <Ionicons
721
- name="key-outline"
722
- size={16}
723
- color={colors.textSecondary}
724
- style={{ marginRight: spacing.sm }}
725
- />
711
+ <KeyRound size={16} color={colors.textSecondary} style={{ marginRight: spacing.sm }} />
726
712
  <TextInput
727
713
  placeholder="0295bf1c7842d14b..."
728
714
  placeholderTextColor={colors.textSecondary}
@@ -746,7 +732,7 @@ function AddProviderModal({
746
732
  onPress={handleDirectValidate}
747
733
  style={[styles.primaryBtn, { backgroundColor: colors.accent }]}
748
734
  >
749
- <Ionicons name="shield-checkmark-outline" size={16} color={colors.background} />
735
+ <ShieldCheck size={16} color={colors.background} />
750
736
  <Text style={[styles.primaryBtnText, { color: colors.background }]}>{t('validate_details')}</Text>
751
737
  </TouchableOpacity>
752
738
  )}
@@ -755,11 +741,11 @@ function AddProviderModal({
755
741
 
756
742
  {/* Toggle advanced */}
757
743
  <TouchableOpacity onPress={() => setAdvanced(v => !v)} style={styles.advancedBtn}>
758
- <Ionicons
759
- name={advanced ? 'chevron-up-outline' : 'chevron-down-outline'}
760
- size={16}
761
- color={colors.textPrimary}
762
- />
744
+ {advanced ? (
745
+ <ChevronUp size={16} color={colors.textPrimary} />
746
+ ) : (
747
+ <ChevronDown size={16} color={colors.textPrimary} />
748
+ )}
763
749
  <Text style={{ marginLeft: spacing.xs, color: colors.textPrimary }}>
764
750
  {advanced ? t('hide_advanced') : t('show_advanced')}
765
751
  </Text>
@@ -788,12 +774,7 @@ function AddProviderModal({
788
774
  { marginTop: spacing.md, borderColor: colors.separator, backgroundColor: colors.fillTertiary }
789
775
  ]}
790
776
  >
791
- <Ionicons
792
- name="pricetag-outline"
793
- size={16}
794
- color={colors.textSecondary}
795
- style={{ marginRight: spacing.sm }}
796
- />
777
+ <Tag size={16} color={colors.textSecondary} style={{ marginRight: spacing.sm }} />
797
778
  <TextInput
798
779
  placeholder="Description"
799
780
  placeholderTextColor={colors.textSecondary}
@@ -818,7 +799,7 @@ function AddProviderModal({
818
799
  onPress={() => onAdd({ name, description, iconUrl: icon, identityKey })}
819
800
  style={[styles.saveBtn, { backgroundColor: colors.accent, opacity: ready ? 1 : 0.5, flex: 0 }]}
820
801
  >
821
- <Ionicons name="shield-checkmark-outline" size={16} color={colors.background} />
802
+ <ShieldCheck size={16} color={colors.background} />
822
803
  <Text style={[styles.saveBtnText, { color: colors.background }]}>Add</Text>
823
804
  </TouchableOpacity>
824
805
  </View>
@@ -830,6 +811,13 @@ function AddProviderModal({
830
811
 
831
812
  // -------------------- Styles --------------------
832
813
  const styles = StyleSheet.create({
814
+ headerBackWell: {
815
+ width: 32,
816
+ height: 32,
817
+ borderRadius: 16,
818
+ alignItems: 'center',
819
+ justifyContent: 'center'
820
+ },
833
821
  header: {
834
822
  flexDirection: 'row',
835
823
  alignItems: 'center',