@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
@@ -19,23 +19,20 @@ import Animated, {
19
19
  useReducedMotion
20
20
  } from 'react-native-reanimated'
21
21
  import { useTheme, spacing, radii, typography, springs, durations, haptics } from '@bsv/expo-wallet-toolbox'
22
+ import { CircleAlert, CircleCheck } from 'lucide-react-native'
22
23
 
23
24
  /**
24
- * @expo/vector-icons' index barrel re-exports every icon set (AntDesign,
25
- * etc.), one of which reaches expo-font -> expo-asset -- untransformed ESM
26
- * that Jest cannot parse when eagerly pulled in via the `ui` package barrel.
27
- * Loaded lazily, only when actually rendering, same pattern as this
28
- * package's other native-module-boundary fixes (expo-router, expo-blur).
25
+ * lucide, like every other glyph this app draws (src/settings/Rows.tsx, the
26
+ * headers, the sheets).
27
+ *
28
+ * Imported at module scope rather than behind a lazy loader. What had to be
29
+ * deferred is @expo/vector-icons' index barrel, which re-exports every icon
30
+ * set and so reaches expo-font -> expo-asset as untransformed ESM; nothing
31
+ * here pulls that barrel in any more. lucide publishes both module formats
32
+ * and Jest resolves the ESM one, so the app pins this name to lucide's CJS
33
+ * entry in jest.moduleNameMapper (package.json), as it already does for its
34
+ * other ESM-only dependencies.
29
35
  */
30
- type IoniconsComponent = typeof import('@expo/vector-icons').Ionicons
31
- let ioniconsComponent: IoniconsComponent | undefined
32
- function loadIonicons(): IoniconsComponent {
33
- if (!ioniconsComponent) {
34
- // eslint-disable-next-line @typescript-eslint/no-require-imports
35
- ioniconsComponent = require('@expo/vector-icons').Ionicons as IoniconsComponent
36
- }
37
- return ioniconsComponent
38
- }
39
36
 
40
37
  export type ToastType = 'info' | 'success' | 'error'
41
38
  interface ToastData {
@@ -62,7 +59,6 @@ export function showToast(message: string, opts?: { type?: ToastType }) {
62
59
 
63
60
  export function ToastHost() {
64
61
  const { colors } = useTheme()
65
- const Ionicons = loadIonicons()
66
62
  const insets = useSafeAreaInsets()
67
63
  const reducedMotion = useReducedMotion()
68
64
  const [toast, setToast] = useState<ToastData | null>(null)
@@ -100,7 +96,7 @@ export function ToastHost() {
100
96
 
101
97
  if (!toast) return null
102
98
 
103
- const icon = toast.type === 'success' ? 'checkmark-circle' : toast.type === 'error' ? 'alert-circle' : null
99
+ const Glyph = toast.type === 'success' ? CircleCheck : toast.type === 'error' ? CircleAlert : null
104
100
  const iconColor = toast.type === 'success' ? colors.success : colors.error
105
101
 
106
102
  return (
@@ -113,7 +109,7 @@ export function ToastHost() {
113
109
  animatedStyle
114
110
  ]}
115
111
  >
116
- {icon && <Ionicons name={icon} size={18} color={iconColor} style={styles.icon} />}
112
+ {Glyph && <Glyph size={18} color={iconColor} style={styles.icon} />}
117
113
  <Text numberOfLines={2} style={[styles.text, { color: colors.textPrimary }]}>
118
114
  {toast.message}
119
115
  </Text>