@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.
- package/CHANGELOG.md +31 -0
- package/core/context/WalletContext.tsx +3 -1
- package/core/i18n/translations.tsx +221 -36
- package/core/identity/handleRegistry/client.ts +110 -16
- package/core/identity/handleRegistry/registration.ts +115 -17
- package/core/profiles/profileStore.ts +4 -1
- package/core/services/groupSpendingLimit.ts +26 -0
- package/core/services/signingPermissionPolicy.ts +14 -8
- package/core/services/vault/ceremony.ts +13 -0
- package/core/services/vault/ceremonyHost.ts +58 -0
- package/core/services/vault/failedVaultSpend.ts +40 -0
- package/core/services/vault/outputAuthority.ts +13 -6
- package/core/services/vault/transfers.ts +56 -12
- package/core/storage/encryptedDbImage.ts +11 -2
- package/core/theme/tokens.ts +26 -12
- package/package.json +2 -1
- package/ui/components/QRScanner.tsx +24 -22
- package/ui/components/pay/MessageBoxConfig.tsx +10 -16
- package/ui/components/pay/NearbyAdvisoryModal.tsx +6 -13
- package/ui/components/pay/NearbyFlow.tsx +72 -35
- package/ui/components/pay/PayForm.tsx +27 -19
- package/ui/components/pay/PaymentSuccessOverlay.tsx +8 -6
- package/ui/components/pay/UniversalSend.tsx +4 -1
- package/ui/components/ui/AlertCard.tsx +3 -2
- package/ui/components/ui/BalancedText.tsx +117 -0
- package/ui/components/ui/ErrorBoundary.tsx +31 -14
- package/ui/components/ui/GroupedList.tsx +28 -22
- package/ui/components/ui/ListRow.tsx +126 -35
- package/ui/components/ui/PermissionSheet.tsx +31 -24
- package/ui/components/ui/PresenceRow.tsx +15 -23
- package/ui/components/ui/Sheet.tsx +11 -17
- package/ui/components/ui/Toast.tsx +13 -17
- package/ui/components/vault/EnrollWizard.tsx +446 -196
- package/ui/components/vault/KeyChooser.tsx +7 -20
- package/ui/components/vault/VaultCeremonySheet.tsx +44 -36
- package/ui/components/wallet/AmountInput.tsx +11 -17
- package/ui/components/wallet/BiometricAdvisoryModal.tsx +13 -17
- package/ui/index.ts +1 -1
- package/ui/screens/TrustScreen.tsx +49 -61
- package/ui/screens/VaultScreen.tsx +99 -60
- package/ui/screens/VaultTransferScreen.tsx +34 -27
- package/ui/screens/WalletCheckScreen.tsx +25 -24
- 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
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
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
|
|
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
|
-
{
|
|
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>
|