@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
@@ -5,6 +5,13 @@ import { useTheme, spacing, radii, typography } from '@bsv/expo-wallet-toolbox'
5
5
  interface GroupedListSection {
6
6
  header?: string
7
7
  footer?: string
8
+ /**
9
+ * Draw the rows on a lifted card. Default. `card={false}` puts them straight
10
+ * on the canvas, which is how this app's own settings page is laid out
11
+ * (src/settings/Rows.tsx) — used by the wallet configuration screen so the
12
+ * two read as one design.
13
+ */
14
+ card?: boolean
8
15
  children: React.ReactNode
9
16
  }
10
17
 
@@ -25,20 +32,10 @@ export const GroupedList: React.FC<GroupedListProps> = ({ sections }) => {
25
32
  {sections.map((section, idx) => (
26
33
  <View key={idx} style={styles.section}>
27
34
  {section.header && (
28
- <Text style={[styles.header, { color: colors.textTertiary }]}>{section.header.toUpperCase()}</Text>
35
+ <Text style={[styles.header, { color: colors.textSecondary }]}>{section.header.toUpperCase()}</Text>
29
36
  )}
30
- <View
31
- style={[
32
- styles.group,
33
- {
34
- backgroundColor: colors.backgroundElevated,
35
- borderColor: colors.separator
36
- }
37
- ]}
38
- >
39
- {section.children}
40
- </View>
41
- {section.footer && <Text style={[styles.footer, { color: colors.textTertiary }]}>{section.footer}</Text>}
37
+ <View style={[styles.group]}>{section.children}</View>
38
+ {section.footer && <Text style={[styles.footer, { color: colors.textSecondary }]}>{section.footer}</Text>}
42
39
  </View>
43
40
  ))}
44
41
  </View>
@@ -48,16 +45,17 @@ export const GroupedList: React.FC<GroupedListProps> = ({ sections }) => {
48
45
  /**
49
46
  * Standalone section for inline use without the GroupedList wrapper.
50
47
  */
51
- export const GroupedSection: React.FC<GroupedListSection> = ({ header, footer, children }) => {
48
+ export const GroupedSection: React.FC<GroupedListSection> = ({ header, footer, card = true, children }) => {
52
49
  const { colors } = useTheme()
53
50
 
54
51
  return (
55
52
  <View style={styles.section}>
56
- {header && <Text style={[styles.header, { color: colors.textTertiary }]}>{header.toUpperCase()}</Text>}
53
+ {header && <Text style={[styles.header, { color: colors.textSecondary }]}>{header.toUpperCase()}</Text>}
57
54
  <View
58
55
  style={[
59
56
  styles.group,
60
- {
57
+ card && {
58
+ ...styles.card,
61
59
  backgroundColor: colors.backgroundElevated,
62
60
  borderColor: colors.separator
63
61
  }
@@ -65,7 +63,7 @@ export const GroupedSection: React.FC<GroupedListSection> = ({ header, footer, c
65
63
  >
66
64
  {children}
67
65
  </View>
68
- {footer && <Text style={[styles.footer, { color: colors.textTertiary }]}>{footer}</Text>}
66
+ {footer && <Text style={[styles.footer, { color: colors.textSecondary }]}>{footer}</Text>}
69
67
  </View>
70
68
  )
71
69
  }
@@ -75,20 +73,27 @@ const styles = StyleSheet.create({
75
73
  flex: 1
76
74
  },
77
75
  section: {
78
- marginBottom: spacing.xxl
76
+ marginBottom: spacing.lg
79
77
  },
80
78
  // Tracked small caps, matching the day headings in the activity list — a
81
79
  // section header is a label for the block under it, not a line of prose.
82
80
  header: {
83
- fontSize: 10.5,
84
- fontWeight: '700',
85
- letterSpacing: 1.3,
81
+ fontFamily: 'Nunito',
82
+ fontSize: 11,
83
+ lineHeight: 16,
84
+ fontWeight: '600',
85
+ letterSpacing: 1.1,
86
86
  paddingHorizontal: spacing.xl,
87
- paddingBottom: spacing.sm
87
+ paddingBottom: 6
88
88
  },
89
89
  // A card lifted off the canvas: the border does the work in dark, the shadow
90
90
  // in light, and the radius says "object" in both.
91
91
  group: {
92
+ marginHorizontal: spacing.sm
93
+ },
94
+ // A card lifted off the canvas: the border does the work in dark, the shadow
95
+ // in light, and the radius says "object" in both.
96
+ card: {
92
97
  borderRadius: radii.lg,
93
98
  marginHorizontal: spacing.lg,
94
99
  borderWidth: StyleSheet.hairlineWidth,
@@ -101,6 +106,7 @@ const styles = StyleSheet.create({
101
106
  },
102
107
  footer: {
103
108
  ...typography.footnote,
109
+ fontFamily: 'Nunito',
104
110
  paddingHorizontal: spacing.xl,
105
111
  paddingTop: spacing.sm
106
112
  }
@@ -1,7 +1,45 @@
1
1
  import React from 'react'
2
2
  import { StyleSheet, Text, View } from 'react-native'
3
- import { useTheme, spacing, typography } from '@bsv/expo-wallet-toolbox'
3
+ import { useTheme, spacing } from '@bsv/expo-wallet-toolbox'
4
4
  import PressableScale from './PressableScale'
5
+ import {
6
+ ArrowLeftRight,
7
+ Banknote,
8
+ Bell,
9
+ Bitcoin,
10
+ Bug,
11
+ ChevronDown,
12
+ ChevronRight,
13
+ CircleAlert,
14
+ CircleCheckBig,
15
+ CirclePlus,
16
+ CircleX,
17
+ Clock,
18
+ CloudUpload,
19
+ Download,
20
+ FlaskConical,
21
+ Globe,
22
+ KeyRound,
23
+ LockOpen,
24
+ LogOut,
25
+ Mail,
26
+ QrCode,
27
+ Radio,
28
+ Receipt,
29
+ RefreshCw,
30
+ Send,
31
+ Server,
32
+ Settings,
33
+ Share2,
34
+ ShieldCheck,
35
+ Terminal,
36
+ Trash2,
37
+ Vault,
38
+ Wifi,
39
+ Wrench,
40
+ Zap,
41
+ type LucideIcon
42
+ } from 'lucide-react-native'
5
43
 
6
44
  /**
7
45
  * @expo/vector-icons' index barrel re-exports every icon set (AntDesign,
@@ -9,7 +47,8 @@ import PressableScale from './PressableScale'
9
47
  * that Jest cannot parse when eagerly pulled in via the `ui` package barrel.
10
48
  * Both icon sets are loaded lazily, only when actually rendering, same
11
49
  * pattern as this package's other native-module-boundary fixes (expo-router,
12
- * expo-blur).
50
+ * expo-blur). They are now only reached by a row whose icon name has no
51
+ * lucide equivalent below.
13
52
  */
14
53
  type IoniconsComponent = typeof import('@expo/vector-icons').Ionicons
15
54
  type MaterialCommunityIconsComponent = typeof import('@expo/vector-icons').MaterialCommunityIcons
@@ -30,13 +69,65 @@ function loadMaterialCommunityIcons(): MaterialCommunityIconsComponent {
30
69
  return materialCommunityIconsComponent
31
70
  }
32
71
 
72
+ /**
73
+ * Every glyph this app draws comes from lucide -- its settings rows
74
+ * (src/settings/Rows.tsx), its headers, its sheets -- so the rows here draw
75
+ * from it too, at the same 16px and the same default stroke. Two icon
76
+ * families in one list is visible at a glance: Ionicons' filled-corner,
77
+ * closed shapes next to lucide's open 2px strokes read as two apps.
78
+ *
79
+ * The prop stays an Ionicons (or MaterialCommunityIcons) name, because that
80
+ * is this component's published API and every call site passes one. This maps
81
+ * each name used across the package to its nearest lucide counterpart; a name
82
+ * with no entry falls through to the set it was written for, so a row added
83
+ * upstream still draws something rather than nothing.
84
+ */
85
+ const LUCIDE: Record<string, LucideIcon> = {
86
+ 'add-circle-outline': CirclePlus,
87
+ 'alert-circle-outline': CircleAlert,
88
+ 'bug-outline': Bug,
89
+ 'cash-outline': Banknote,
90
+ 'checkmark-done-circle-outline': CircleCheckBig,
91
+ 'close-circle-outline': CircleX,
92
+ 'cloud-upload-outline': CloudUpload,
93
+ 'construct-outline': Wrench,
94
+ 'download-outline': Download,
95
+ 'flash-outline': Zap,
96
+ 'flask-outline': FlaskConical,
97
+ 'globe-outline': Globe,
98
+ 'key-outline': KeyRound,
99
+ 'lock-open': LockOpen,
100
+ 'log-out-outline': LogOut,
101
+ 'logo-bitcoin': Bitcoin,
102
+ 'mail-outline': Mail,
103
+ 'notifications-outline': Bell,
104
+ 'qr-code-outline': QrCode,
105
+ 'radio-outline': Radio,
106
+ 'receipt-outline': Receipt,
107
+ 'refresh-outline': RefreshCw,
108
+ // MaterialCommunityIcons' `safe` -- the one concept Ionicons had no glyph
109
+ // for, and the reason iconFamily exists. lucide has it.
110
+ safe: Vault,
111
+ 'send-outline': Send,
112
+ 'server-outline': Server,
113
+ 'settings-outline': Settings,
114
+ 'share-outline': Share2,
115
+ 'shield-checkmark-outline': ShieldCheck,
116
+ 'swap-horizontal-outline': ArrowLeftRight,
117
+ 'terminal-outline': Terminal,
118
+ 'time-outline': Clock,
119
+ 'trash-outline': Trash2,
120
+ 'wifi-outline': Wifi
121
+ }
122
+
33
123
  interface ListRowProps {
34
124
  label: string
35
125
  /** Secondary line under the label. Settings rows use this for the explaining copy. */
36
126
  subtitle?: string
37
127
  value?: string
38
128
  /** Ionicons name by default; a MaterialCommunityIcons name when
39
- * `iconFamily="material-community"`. */
129
+ * `iconFamily="material-community"`. Drawn as its lucide equivalent, which
130
+ * is what the rest of this app draws. */
40
131
  icon?: keyof IoniconsComponent['glyphMap'] | keyof MaterialCommunityIconsComponent['glyphMap']
41
132
  /** Ionicons covers almost everything here, but a few concepts have no glyph
42
133
  * in it (e.g. a bank vault — `lock-closed` reads as a generic padlock).
@@ -72,16 +163,11 @@ export const ListRow: React.FC<ListRowProps> = ({
72
163
  testID
73
164
  }) => {
74
165
  const { colors } = useTheme()
75
- const Ionicons = loadIonicons()
76
- const MaterialCommunityIcons = loadMaterialCommunityIcons()
166
+ const Glyph = icon ? LUCIDE[icon as string] : undefined
167
+ const Chevron = chevronDown ? ChevronDown : ChevronRight
77
168
 
78
169
  const content = (
79
- <View
80
- style={[
81
- styles.container,
82
- !isLast && { borderBottomWidth: StyleSheet.hairlineWidth, borderBottomColor: colors.separator }
83
- ]}
84
- >
170
+ <View style={styles.container}>
85
171
  {icon && (
86
172
  <View
87
173
  style={[
@@ -91,18 +177,20 @@ export const ListRow: React.FC<ListRowProps> = ({
91
177
  : { backgroundColor: colors.surfaceSunken, borderColor: colors.surfaceSunkenBorder }
92
178
  ]}
93
179
  >
94
- {iconFamily === 'material-community' ? (
95
- <MaterialCommunityIcons
96
- name={icon as keyof typeof MaterialCommunityIcons.glyphMap}
97
- size={17}
98
- color={iconColor || colors.textSecondary}
99
- />
180
+ {Glyph ? (
181
+ <Glyph size={16} color={iconColor || colors.textPrimary} />
182
+ ) : iconFamily === 'material-community' ? (
183
+ React.createElement(loadMaterialCommunityIcons(), {
184
+ name: icon as never,
185
+ size: 16,
186
+ color: iconColor || colors.textPrimary
187
+ })
100
188
  ) : (
101
- <Ionicons
102
- name={icon as keyof typeof Ionicons.glyphMap}
103
- size={17}
104
- color={iconColor || colors.textSecondary}
105
- />
189
+ React.createElement(loadIonicons(), {
190
+ name: icon as never,
191
+ size: 16,
192
+ color: iconColor || colors.textPrimary
193
+ })
106
194
  )}
107
195
  </View>
108
196
  )}
@@ -124,12 +212,7 @@ export const ListRow: React.FC<ListRowProps> = ({
124
212
  </Text>
125
213
  )}
126
214
  {showChevron && onPress && !destructive && (
127
- <Ionicons
128
- name={chevronDown ? 'chevron-down' : 'chevron-forward'}
129
- size={18}
130
- color={colors.textQuaternary}
131
- style={styles.chevron}
132
- />
215
+ <Chevron size={16} color={colors.textSecondary} style={styles.chevron} />
133
216
  )}
134
217
  </View>
135
218
  </View>
@@ -158,16 +241,17 @@ const styles = StyleSheet.create({
158
241
  alignItems: 'center',
159
242
  minHeight: 44,
160
243
  paddingVertical: spacing.md,
161
- paddingHorizontal: spacing.lg
244
+ paddingHorizontal: spacing.md,
245
+ borderRadius: 19.04
162
246
  },
163
247
  // A well the glyph sits in, tinted by the row's own colour rather than
164
248
  // flooded with it. A grid of saturated tiles reads as decoration and makes
165
249
  // every row shout equally; the tint keeps the category cue and drops the
166
250
  // shouting.
167
251
  iconContainer: {
168
- width: 28,
169
- height: 28,
170
- borderRadius: 9,
252
+ width: 36,
253
+ height: 36,
254
+ borderRadius: 19.04,
171
255
  borderWidth: StyleSheet.hairlineWidth,
172
256
  alignItems: 'center',
173
257
  justifyContent: 'center',
@@ -177,10 +261,15 @@ const styles = StyleSheet.create({
177
261
  flex: 1
178
262
  },
179
263
  label: {
180
- ...typography.body
264
+ fontFamily: 'Nunito',
265
+ fontSize: 14,
266
+ lineHeight: 20,
267
+ fontWeight: '500'
181
268
  },
182
269
  subtitle: {
183
- ...typography.footnote,
270
+ fontFamily: 'Nunito',
271
+ fontSize: 12,
272
+ lineHeight: 16,
184
273
  marginTop: 1
185
274
  },
186
275
  trailing: {
@@ -190,7 +279,9 @@ const styles = StyleSheet.create({
190
279
  marginLeft: spacing.sm
191
280
  },
192
281
  value: {
193
- ...typography.body,
282
+ fontFamily: 'Nunito',
283
+ fontSize: 13,
284
+ lineHeight: 18,
194
285
  maxWidth: 200
195
286
  },
196
287
  chevron: {
@@ -51,21 +51,17 @@ function managerToken(manager: unknown): string {
51
51
  const TAP_PROTECTION_MS = 700
52
52
 
53
53
  // ---------------------------------------------------------------------------
54
- // @expo/vector-icons' index barrel re-exports every icon set (AntDesign,
55
- // etc.), one of which reaches expo-font -> expo-asset -- untransformed ESM
56
- // that Jest cannot parse when eagerly pulled in via the `ui` package barrel.
57
- // Loaded lazily, only when actually rendering, same pattern as this
58
- // package's other native-module-boundary fixes (expo-router, expo-blur).
54
+ // lucide, like every other glyph this app draws. Imported at module scope
55
+ // rather than behind a lazy loader. What had to be deferred is
56
+ // @expo/vector-icons' index barrel, which re-exports every icon set and so
57
+ // reaches expo-font -> expo-asset as untransformed ESM; nothing here pulls
58
+ // that barrel in any more. lucide publishes both module formats and Jest
59
+ // resolves the ESM one, so the app pins this name to lucide's CJS entry in
60
+ // jest.moduleNameMapper (package.json), as it already does for its other
61
+ // ESM-only dependencies.
59
62
  // ---------------------------------------------------------------------------
60
- type IoniconsComponent = typeof import('@expo/vector-icons').Ionicons
61
- let ioniconsComponent: IoniconsComponent | undefined
62
- function loadIonicons(): IoniconsComponent {
63
- if (!ioniconsComponent) {
64
- // eslint-disable-next-line @typescript-eslint/no-require-imports
65
- ioniconsComponent = require('@expo/vector-icons').Ionicons as IoniconsComponent
66
- }
67
- return ioniconsComponent
68
- }
63
+ import { Check, ChevronDown, ChevronUp } from 'lucide-react-native'
64
+ import { BalancedText } from './BalancedText'
69
65
 
70
66
  // ---------------------------------------------------------------------------
71
67
  // Types
@@ -503,7 +499,7 @@ function GroupPermissionSections({ group, unverified }: { group: GroupPermission
503
499
  <Text style={[styles.groupSectionTitle, { color: colors.textSecondary }]}>{t('spending_section')}</Text>
504
500
  <View style={styles.groupRow}>
505
501
  <Text style={[styles.groupRowLabel, { color: colors.textPrimary }]}>
506
- <AmountDisplay>{group.spendingAuthorization.amount}</AmountDisplay>
502
+ {t('spending_up_to')} <AmountDisplay>{group.spendingAuthorization.amount}</AmountDisplay> {t('spending_each_month')}
507
503
  </Text>
508
504
  {group.spendingAuthorization.description && (
509
505
  <Text style={[styles.groupRowDesc, { color: colors.textSecondary }]}>
@@ -606,7 +602,6 @@ interface PermissionSheetProps {
606
602
  const PermissionSheet: React.FC<PermissionSheetProps> = ({ backdropDismisses = true }) => {
607
603
  const { t } = useTranslation()
608
604
  const { colors } = useTheme()
609
- const Ionicons = loadIonicons()
610
605
 
611
606
  const {
612
607
  protocolRequests,
@@ -1097,12 +1092,11 @@ const PermissionSheet: React.FC<PermissionSheetProps> = ({ backdropDismisses = t
1097
1092
  <Text style={[styles.detailsToggleText, { color: colors.textSecondary }]}>
1098
1093
  {detailsExpanded ? t('hide_details') : t('details')}
1099
1094
  </Text>
1100
- <Ionicons
1101
- name={detailsExpanded ? 'chevron-up' : 'chevron-down'}
1102
- size={12}
1103
- color={colors.textSecondary}
1104
- style={styles.chevron}
1105
- />
1095
+ {React.createElement(detailsExpanded ? ChevronUp : ChevronDown, {
1096
+ size: 12,
1097
+ color: colors.textSecondary,
1098
+ style: styles.chevron
1099
+ })}
1106
1100
  </TouchableOpacity>
1107
1101
 
1108
1102
  {detailsExpanded && (
@@ -1154,7 +1148,9 @@ const PermissionSheet: React.FC<PermissionSheetProps> = ({ backdropDismisses = t
1154
1148
  {/* -------- The ask, then the figure. The sentence is the quiet
1155
1149
  half: it says what for, the amount says how much. -------- */}
1156
1150
  <View style={styles.askBlock}>
1157
- <Text style={[styles.description, { color: colors.textSecondary }]}>{active.description}</Text>
1151
+ <BalancedText style={[styles.description, { color: colors.textSecondary }]}>
1152
+ {active.description}
1153
+ </BalancedText>
1158
1154
 
1159
1155
  {active.siteSays ? (
1160
1156
  <View style={[styles.siteSays, { borderColor: colors.separator }]}>
@@ -1204,7 +1200,7 @@ const PermissionSheet: React.FC<PermissionSheetProps> = ({ backdropDismisses = t
1204
1200
  testID="bridge-approve"
1205
1201
  >
1206
1202
  {granted ? (
1207
- <Ionicons name="checkmark" size={22} color={colors.textOnAccent} />
1203
+ <Check size={22} color={colors.textOnAccent} />
1208
1204
  ) : (
1209
1205
  <Text style={[styles.buttonAllowText, { color: colors.textOnAccent }]}>
1210
1206
  {t(active.kind === 'connection' ? 'bridge_connect' : 'authorize')}
@@ -1245,6 +1241,7 @@ const styles = StyleSheet.create({
1245
1241
  marginRight: spacing.md
1246
1242
  },
1247
1243
  faviconLetter: {
1244
+ fontFamily: 'Nunito',
1248
1245
  fontSize: 17,
1249
1246
  fontWeight: '700'
1250
1247
  },
@@ -1252,6 +1249,7 @@ const styles = StyleSheet.create({
1252
1249
  flex: 1
1253
1250
  },
1254
1251
  originator: {
1252
+ fontFamily: 'Nunito',
1255
1253
  fontSize: 15,
1256
1254
  fontWeight: '600',
1257
1255
  letterSpacing: -0.1
@@ -1331,11 +1329,13 @@ const styles = StyleSheet.create({
1331
1329
  paddingTop: spacing.xxl
1332
1330
  },
1333
1331
  description: {
1332
+ fontFamily: 'Nunito',
1334
1333
  fontSize: 13.5,
1335
1334
  lineHeight: 18,
1336
1335
  textAlign: 'center'
1337
1336
  },
1338
1337
  amountValue: {
1338
+ fontFamily: 'Nunito',
1339
1339
  fontSize: 42,
1340
1340
  fontWeight: '700',
1341
1341
  lineHeight: 44,
@@ -1344,6 +1344,7 @@ const styles = StyleSheet.create({
1344
1344
  fontVariant: ['tabular-nums']
1345
1345
  },
1346
1346
  amountUnit: {
1347
+ fontFamily: 'Nunito',
1347
1348
  fontSize: 19,
1348
1349
  fontWeight: '600',
1349
1350
  letterSpacing: 0
@@ -1360,6 +1361,7 @@ const styles = StyleSheet.create({
1360
1361
  paddingVertical: spacing.xs
1361
1362
  },
1362
1363
  detailsToggleText: {
1364
+ fontFamily: 'Nunito',
1363
1365
  fontSize: 12.5,
1364
1366
  fontWeight: '600'
1365
1367
  },
@@ -1382,10 +1384,12 @@ const styles = StyleSheet.create({
1382
1384
  paddingVertical: 10
1383
1385
  },
1384
1386
  detailLabel: {
1387
+ fontFamily: 'Nunito',
1385
1388
  fontSize: 13,
1386
1389
  flexShrink: 1
1387
1390
  },
1388
1391
  detailValue: {
1392
+ fontFamily: 'Nunito',
1389
1393
  fontSize: 13.5,
1390
1394
  fontWeight: '600',
1391
1395
  textAlign: 'right',
@@ -1395,6 +1399,7 @@ const styles = StyleSheet.create({
1395
1399
  flexShrink: 1
1396
1400
  },
1397
1401
  detailUnit: {
1402
+ fontFamily: 'Nunito',
1398
1403
  fontSize: 11.5,
1399
1404
  fontWeight: '500'
1400
1405
  },
@@ -1453,6 +1458,7 @@ const styles = StyleSheet.create({
1453
1458
  justifyContent: 'center'
1454
1459
  },
1455
1460
  buttonDenyText: {
1461
+ fontFamily: 'Nunito',
1456
1462
  fontSize: 15,
1457
1463
  fontWeight: '600'
1458
1464
  },
@@ -1469,6 +1475,7 @@ const styles = StyleSheet.create({
1469
1475
  elevation: 4
1470
1476
  },
1471
1477
  buttonAllowText: {
1478
+ fontFamily: 'Nunito',
1472
1479
  fontSize: 15,
1473
1480
  fontWeight: '700'
1474
1481
  }
@@ -50,21 +50,16 @@ import Animated, {
50
50
  import { useTheme, spacing, typography, durations, easings, springs } from '@bsv/expo-wallet-toolbox'
51
51
 
52
52
  /**
53
- * @expo/vector-icons' index barrel re-exports every icon set (AntDesign,
54
- * etc.), one of which reaches expo-font -> expo-asset -- untransformed ESM
55
- * that Jest cannot parse when eagerly pulled in via the `ui` package barrel.
56
- * Loaded lazily, only when actually rendering, same pattern as this
57
- * package's other native-module-boundary fixes (expo-router, expo-blur).
53
+ * lucide, like every other glyph this app draws. Imported at module scope
54
+ * rather than behind a lazy loader: what had to be deferred is
55
+ * @expo/vector-icons' index barrel, which re-exports every icon set and so
56
+ * reaches expo-font -> expo-asset as untransformed ESM; nothing here pulls
57
+ * that barrel in any more. lucide publishes both module formats and Jest
58
+ * resolves the ESM one, so the app pins this name to lucide's CJS entry in
59
+ * jest.moduleNameMapper (package.json), as it already does for its other
60
+ * ESM-only dependencies.
58
61
  */
59
- type IoniconsComponent = typeof import('@expo/vector-icons').Ionicons
60
- let ioniconsComponent: IoniconsComponent | undefined
61
- function loadIonicons(): IoniconsComponent {
62
- if (!ioniconsComponent) {
63
- // eslint-disable-next-line @typescript-eslint/no-require-imports
64
- ioniconsComponent = require('@expo/vector-icons').Ionicons as IoniconsComponent
65
- }
66
- return ioniconsComponent
67
- }
62
+ import { BluetoothIcon, CircleCheck, Lock, QrCode, Wifi, type LucideIcon } from 'lucide-react-native'
68
63
 
69
64
  export type PresenceState =
70
65
  /** No live link on this path. The QR hand-off. */
@@ -94,25 +89,22 @@ interface PresenceRowProps {
94
89
  medium?: 'wifi' | 'bluetooth'
95
90
  }
96
91
 
97
- type IconName = keyof IoniconsComponent['glyphMap']
98
-
99
- function iconFor(state: PresenceState, medium: 'wifi' | 'bluetooth'): IconName {
92
+ function iconFor(state: PresenceState, medium: 'wifi' | 'bluetooth'): LucideIcon {
100
93
  switch (state) {
101
94
  case 'qr':
102
- return 'qr-code-outline'
95
+ return QrCode
103
96
  case 'ready':
104
97
  case 'waiting':
105
- return medium === 'bluetooth' ? 'bluetooth' : 'wifi'
98
+ return medium === 'bluetooth' ? BluetoothIcon : Wifi
106
99
  case 'linked':
107
- return 'lock-closed'
100
+ return Lock
108
101
  case 'paid':
109
- return 'checkmark-circle'
102
+ return CircleCheck
110
103
  }
111
104
  }
112
105
 
113
106
  export default function PresenceRow({ state, label, peer, medium = 'wifi' }: PresenceRowProps) {
114
107
  const { colors } = useTheme()
115
- const Ionicons = loadIonicons()
116
108
  const reducedMotion = useReducedMotion()
117
109
 
118
110
  // 0 → 1 on every state change. Re-run rather than cross-faded: the row is one
@@ -180,7 +172,7 @@ export default function PresenceRow({ state, label, peer, medium = 'wifi' }: Pre
180
172
  reach the one state where naming the radio matters most: the payee
181
173
  waiting on a link that may be Bluetooth. */}
182
174
  <Animated.View style={dotStyle}>
183
- <Ionicons name={iconFor(state, medium)} size={13} color={dotColor} />
175
+ {React.createElement(iconFor(state, medium), { size: 13, color: dotColor })}
184
176
  </Animated.View>
185
177
  <Text style={[styles.label, { color: labelColor }, strong && styles.labelStrong]} numberOfLines={1}>
186
178
  {label}
@@ -18,21 +18,16 @@ import ScreenGradient from './ScreenGradient'
18
18
  import { onSheetResumed } from './sheetResumeSignal'
19
19
 
20
20
  /**
21
- * @expo/vector-icons' index barrel re-exports every icon set (AntDesign,
22
- * etc.), one of which reaches expo-font -> expo-asset -- untransformed ESM
23
- * that Jest cannot parse when eagerly pulled in via the `ui` package barrel.
24
- * Loaded lazily, only when actually rendering, same pattern as this
25
- * package's other native-module-boundary fixes (expo-router, expo-blur).
21
+ * lucide, like every other glyph this app draws. Imported at module scope
22
+ * rather than behind a lazy loader: what had to be deferred is
23
+ * @expo/vector-icons' index barrel, which re-exports every icon set and so
24
+ * reaches expo-font -> expo-asset as untransformed ESM; nothing here pulls
25
+ * that barrel in any more. lucide publishes both module formats and Jest
26
+ * resolves the ESM one, so the app pins this name to lucide's CJS entry in
27
+ * jest.moduleNameMapper (package.json), as it already does for its other
28
+ * ESM-only dependencies.
26
29
  */
27
- type IoniconsComponent = typeof import('@expo/vector-icons').Ionicons
28
- let ioniconsComponent: IoniconsComponent | undefined
29
- function loadIonicons(): IoniconsComponent {
30
- if (!ioniconsComponent) {
31
- // eslint-disable-next-line @typescript-eslint/no-require-imports
32
- ioniconsComponent = require('@expo/vector-icons').Ionicons as IoniconsComponent
33
- }
34
- return ioniconsComponent
35
- }
30
+ import { ChevronLeft } from 'lucide-react-native'
36
31
 
37
32
  interface SheetProps {
38
33
  visible: boolean
@@ -78,7 +73,6 @@ const Sheet: React.FC<SheetProps> = ({
78
73
  children
79
74
  }) => {
80
75
  const { colors } = useTheme()
81
- const Ionicons = loadIonicons()
82
76
  const insets = useSafeAreaInsets()
83
77
  const { height: windowHeight } = Dimensions.get('window')
84
78
  const maxSheetHeight = fullPage ? windowHeight : Math.max(0, Math.min(1, heightPercent)) * windowHeight
@@ -222,7 +216,7 @@ const Sheet: React.FC<SheetProps> = ({
222
216
  <View style={[styles.fullPageHeader, { borderBottomColor: colors.separator }]}>
223
217
  {onBack ? (
224
218
  <TouchableOpacity style={styles.fullPageBack} onPress={onBack} activeOpacity={0.6}>
225
- <Ionicons name="chevron-back" size={24} color={colors.textSecondary} />
219
+ <ChevronLeft size={24} color={colors.textSecondary} />
226
220
  </TouchableOpacity>
227
221
  ) : (
228
222
  <View style={styles.fullPageBack} />
@@ -288,7 +282,7 @@ const Sheet: React.FC<SheetProps> = ({
288
282
  <View style={styles.headerRow}>
289
283
  {onBack ? (
290
284
  <TouchableOpacity style={styles.backButton} onPress={onBack} activeOpacity={0.6}>
291
- <Ionicons name="chevron-back" size={22} color={colors.textSecondary} />
285
+ <ChevronLeft size={22} color={colors.textSecondary} />
292
286
  </TouchableOpacity>
293
287
  ) : (
294
288
  <View style={styles.backButton} />