@bsv/expo-wallet-toolbox 0.5.0 → 0.9.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 +2000 -0
- package/README.md +66 -1
- package/core/amountFormatHelpers.ts +258 -36
- package/core/backup/RemoteSyncReader.ts +133 -24
- package/core/backup/appData.ts +157 -0
- package/core/backup/client.ts +15 -1
- package/core/backup/codec.ts +149 -11
- package/core/backup/constants.ts +30 -1
- package/core/backup/cursor.ts +31 -2
- package/core/backup/push.ts +71 -5
- package/core/backup/restore.ts +104 -16
- package/core/backup/restoreOnImport.ts +94 -30
- package/core/backup/status.ts +13 -8
- package/core/config.tsx +12 -5
- package/core/constants.ts +14 -1
- package/core/contacts/contactActivity.ts +153 -0
- package/core/contacts/contactCache.ts +41 -0
- package/core/contacts/contactsStore.ts +183 -0
- package/core/context/ExchangeRateContext.tsx +34 -27
- package/core/context/LocalStorageProvider.tsx +43 -40
- package/core/context/UserContext.tsx +18 -7
- package/core/context/VaultContext.tsx +49 -2
- package/core/context/WalletConnectionContext.tsx +203 -11
- package/core/context/WalletContext.tsx +685 -171
- package/core/demo/demoAssets.ts +60 -0
- package/core/demo/demoLedger.ts +240 -0
- package/core/demo/demoMandalaRuntime.ts +96 -0
- package/core/demo/demoMode.ts +38 -0
- package/core/demo/demoWallet.ts +25 -0
- package/core/demo/index.ts +26 -0
- package/core/demo/useDemo.ts +59 -0
- package/core/headers/OfflineFirstChaintracks.ts +99 -17
- package/core/headers/headerStore.ts +33 -14
- package/core/headers/syncHeaders.ts +12 -1
- package/core/i18n/translations.tsx +2186 -98
- package/core/identity/contactLink.ts +36 -0
- package/core/identity/handleRegistry/client.ts +314 -0
- package/core/identity/handleRegistry/keyPinStore.ts +70 -0
- package/core/identity/handleRegistry/profileCert.ts +254 -0
- package/core/identity/handleRegistry/registration.ts +559 -0
- package/core/identity/handleRegistry/resolver.ts +315 -0
- package/core/identity/handleRegistry/rules.ts +104 -0
- package/core/index.ts +53 -5
- package/core/localpay/build.ts +225 -24
- package/core/localpay/pending.ts +110 -7
- package/core/localpay/pendingAbortAuthority.ts +95 -0
- package/core/localpay/pendingAborts.ts +266 -26
- package/core/localpay/session.ts +42 -17
- package/core/localpay/settlementAck.ts +10 -1
- package/core/localpay/transport/socket.ts +52 -3
- package/core/localpay/verify.ts +100 -10
- package/core/mandala/abortGuard.ts +96 -20
- package/core/mandala/createRuntime.ts +206 -33
- package/core/mandala/drain.ts +89 -11
- package/core/mandala/inboxPrehold.ts +186 -0
- package/core/mandala/permissionModule.ts +202 -20
- package/core/mandala/settlementStore.ts +24 -2
- package/core/mandala/types.ts +40 -5
- package/core/monitor/MonitorSupervisor.ts +121 -0
- package/core/monitor/TaskBackupPush.ts +15 -1
- package/core/monitor/TaskCreditInbox.ts +1 -1
- package/core/monitor/TaskDrainOutbox.ts +15 -1
- package/core/monitor/TaskSendOffline.ts +15 -1
- package/core/net/online.ts +49 -0
- package/core/net/publicDestination.ts +91 -0
- package/core/net/validateArcUrl.ts +22 -0
- package/core/numberFormat.ts +19 -0
- package/core/offline/cancelParked.ts +134 -13
- package/core/offline/payerHold.ts +100 -24
- package/core/offline/plan.ts +37 -8
- package/core/pay/beefRepair.ts +6 -2
- package/core/pay/damagedInbox.ts +24 -0
- package/core/pay/rails/address.ts +107 -12
- package/core/pay/rails/handle.ts +117 -22
- package/core/pay/rails/index.ts +45 -7
- package/core/pay/rails/nativeIntent.ts +61 -0
- package/core/pay/receiveHistory.ts +93 -0
- package/core/pay/recordProof.ts +21 -7
- package/core/pay/refreshProofGuard.ts +42 -1
- package/core/pay/watchlist.ts +5 -2
- package/core/peerpay/control.ts +17 -18
- package/core/peerpay/handleResendRequests.ts +58 -4
- package/core/peerpay/outbox.ts +3 -1
- package/core/recovery/backupMaterial.ts +61 -0
- package/core/recovery/createWallet.ts +95 -0
- package/core/recovery/recoverWallet.ts +120 -0
- package/core/recovery/restoreWallet.ts +170 -0
- package/core/recovery/secret.ts +92 -0
- package/core/recovery/shareCollector.ts +71 -0
- package/core/recovery/shareParsing.ts +87 -0
- package/core/recovery/shares.ts +116 -0
- package/core/recovery/useRecoveryDeps.ts +70 -0
- package/core/services/arcTokenStorage.ts +52 -0
- package/core/services/arcadeBroadcastProvider.ts +233 -52
- package/core/services/autoApprovePolicy.ts +105 -0
- package/core/services/callbackToken.ts +19 -0
- package/core/services/capWalletArgs.ts +14 -2
- package/core/services/connectionAuthority.ts +98 -0
- package/core/services/exchangeRate.ts +36 -13
- package/core/services/externalOrigin.ts +16 -2
- package/core/services/secrets/kek.ts +126 -29
- package/core/services/secrets/migration.ts +16 -4
- package/core/services/secrets/store.ts +42 -14
- package/core/services/vault/VaultKeyService.ts +228 -45
- package/core/services/vault/chainRecovery.ts +483 -0
- package/core/services/vault/driver.ts +9 -1
- package/core/services/vault/enrolledSerialRegistry.ts +150 -0
- package/core/services/vault/guard.ts +218 -32
- package/core/services/vault/hardwareLease.ts +19 -0
- package/core/services/vault/metaAuthority.ts +210 -0
- package/core/services/vault/pivReset.ts +64 -23
- package/core/services/vault/r1comb.ts +139 -3
- package/core/services/vault/session.ts +25 -4
- package/core/services/vault/transfers.ts +868 -172
- package/core/services/vault/types.ts +19 -4
- package/core/services/vault/vaultStore.ts +256 -29
- package/core/services/walletArgLimits.ts +45 -2
- package/core/services/walletConnectionValidation.ts +76 -6
- package/core/services/walletServiceConfig.ts +40 -27
- package/core/storage/StorageExpoSQLite.ts +88 -47
- package/core/storage/methods/findSql.ts +24 -2
- package/core/storage/methods/listActionsSql.ts +8 -5
- package/core/storage/methods/listOutputsSql.ts +2 -2
- package/core/storage/methods/offlineActions.ts +10 -1
- package/core/storage/methods/processOfflineActions.ts +117 -25
- package/core/storage/methods/reviewStatusSql.ts +7 -2
- package/core/storage/schema/createTables.ts +155 -2
- package/core/stores/ConnectionStore.ts +34 -0
- package/core/toolboxConfig.ts +104 -0
- package/core/toolboxTypes.ts +40 -0
- package/core/userAvatar.ts +79 -0
- package/core/walletDbRegistry.ts +63 -0
- package/core/walletMonitor.ts +25 -4
- package/core/walletRepair/releaseStuckReservations.ts +72 -0
- package/core/walletRepair/shouldMarkUnspendable.ts +20 -0
- package/core/walletRepair/spenderConsumesOutpoint.ts +29 -0
- package/package.json +7 -7
- package/ui/activityFilter.ts +115 -0
- package/ui/backupShares.ts +26 -169
- package/ui/components/pay/AddressReceive.tsx +13 -6
- package/ui/components/pay/AssetPicker.tsx +30 -9
- package/ui/components/pay/MessageBoxConfig.tsx +16 -0
- package/ui/components/pay/NearbyFlow.tsx +480 -243
- package/ui/components/pay/PaymentSuccessOverlay.tsx +85 -10
- package/ui/components/pay/RecipientField.tsx +84 -70
- package/ui/components/pay/StepBar.tsx +32 -0
- package/ui/components/pay/UniversalSend.tsx +827 -205
- package/ui/components/ui/AlertCard.tsx +38 -5
- package/ui/components/ui/PencilEditField.tsx +109 -0
- package/ui/components/ui/PermissionSheet.tsx +197 -66
- package/ui/components/ui/SlideOverFromRight.tsx +86 -0
- package/ui/components/vault/EnrollWizard.tsx +61 -13
- package/ui/components/vault/vaultErrorCopy.ts +3 -1
- package/ui/components/wallet/ActivityRow.tsx +227 -123
- package/ui/components/wallet/AmountInput.tsx +26 -8
- package/ui/components/wallet/AssetSwitcherDropdown.tsx +22 -2
- package/ui/components/wallet/Balance.tsx +42 -23
- package/ui/components/wallet/BiometricAdvisoryModal.tsx +16 -3
- package/ui/components/wallet/ContactActivityList.tsx +149 -0
- package/ui/components/wallet/ContactSigil.tsx +49 -0
- package/ui/components/wallet/EditPictureSheet.tsx +99 -0
- package/ui/components/wallet/FitAmount.tsx +148 -0
- package/ui/components/wallet/IconPickerSheet.tsx +168 -0
- package/ui/components/wallet/IdentifierRow.tsx +69 -0
- package/ui/components/wallet/ImportFromBackupPrompt.tsx +35 -13
- package/ui/components/wallet/ProfileButton.tsx +62 -0
- package/ui/components/wallet/UserAvatar.tsx +85 -0
- package/ui/components/wallet/avatarIcons.ts +122 -0
- package/ui/exportTransactions.ts +36 -4
- package/ui/hooks/useContactsStore.ts +10 -0
- package/ui/hooks/useExportWalletData.ts +25 -2
- package/ui/hooks/useMandala.ts +18 -1
- package/ui/hooks/useOnline.ts +65 -20
- package/ui/importDatabases.ts +339 -24
- package/ui/index.ts +33 -2
- package/ui/isImageUrl.ts +6 -0
- package/ui/printRecoveryShares.ts +9 -10
- package/ui/recoveryPrompts.ts +91 -0
- package/ui/resolveIdentity.ts +31 -9
- package/ui/screens/ConnectionsScreen.tsx +86 -19
- package/ui/screens/ContactScreen.tsx +289 -0
- package/ui/screens/ContactsScreen.tsx +373 -0
- package/ui/screens/IdentifierScreen.tsx +256 -0
- package/ui/screens/NewContactScreen.tsx +362 -0
- package/ui/screens/PairScreen.tsx +74 -2
- package/ui/screens/PayScreen.tsx +20 -7
- package/ui/screens/ProfileScreen.tsx +783 -0
- package/ui/screens/SettingsScreen.tsx +10 -4
- package/ui/screens/TransactionDetailScreen.tsx +419 -0
- package/ui/screens/TrustScreen.tsx +100 -5
- package/ui/screens/VaultScreen.tsx +410 -61
- package/ui/screens/VaultTransferScreen.tsx +59 -7
- package/ui/screens/WalletCheckScreen.tsx +17 -6
- package/ui/screens/WalletConfigScreen.tsx +124 -28
- package/ui/screens/WalletHomeScreen.tsx +640 -104
- package/ui/screens/detailActionKeys.ts +55 -0
- package/ui/tokenFormat.ts +44 -4
- package/ui/tokenStatus.ts +21 -0
- package/ui/txStatus.ts +48 -5
- package/core/storage/LocalStorageAdapter.ts +0 -58
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contacts — your saved counterparties in a grouped card, a second "Other
|
|
3
|
+
* people" card of network search hits once you type, a scanner for someone's
|
|
4
|
+
* profile code (header, top right) and a New Contact button at the bottom.
|
|
5
|
+
* Reached from the bottom of Pay step "who" (never from Home); back returns
|
|
6
|
+
* there.
|
|
7
|
+
*/
|
|
8
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react'
|
|
9
|
+
import {
|
|
10
|
+
ActivityIndicator,
|
|
11
|
+
I18nManager,
|
|
12
|
+
Modal,
|
|
13
|
+
ScrollView,
|
|
14
|
+
StyleSheet,
|
|
15
|
+
Text,
|
|
16
|
+
TextInput,
|
|
17
|
+
TouchableOpacity,
|
|
18
|
+
View
|
|
19
|
+
} from 'react-native'
|
|
20
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
|
21
|
+
import { useTranslation } from 'react-i18next'
|
|
22
|
+
import type { DisplayableIdentity } from '@bsv/sdk'
|
|
23
|
+
import { useTheme, spacing, radii, typography, useWallet } from '@bsv/expo-wallet-toolbox'
|
|
24
|
+
import QRScanner from '../components/QRScanner'
|
|
25
|
+
import PressableScale from '../components/ui/PressableScale'
|
|
26
|
+
import { GroupedSection } from '../components/ui/GroupedList'
|
|
27
|
+
import ContactSigil from '../components/wallet/ContactSigil'
|
|
28
|
+
import { useContactsStore } from '../hooks/useContactsStore'
|
|
29
|
+
import { makeIdentityClient, searchIdentities } from '../resolveIdentity'
|
|
30
|
+
import { parseIdentityKeyFromScan } from '../../core/identity/contactLink'
|
|
31
|
+
import { abbreviateKey } from '../../core/pay/counterparty'
|
|
32
|
+
import type { ContactRow } from '../../core/contacts/contactsStore'
|
|
33
|
+
|
|
34
|
+
type IoniconsComponent = typeof import('@expo/vector-icons').Ionicons
|
|
35
|
+
let ioniconsComponent: IoniconsComponent | undefined
|
|
36
|
+
function loadIonicons(): IoniconsComponent {
|
|
37
|
+
if (!ioniconsComponent) {
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
39
|
+
ioniconsComponent = require('@expo/vector-icons').Ionicons as IoniconsComponent
|
|
40
|
+
}
|
|
41
|
+
return ioniconsComponent
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
type ExpoRouterModule = typeof import('expo-router')
|
|
45
|
+
let expoRouterMod: ExpoRouterModule | undefined
|
|
46
|
+
function loadExpoRouter(): ExpoRouterModule {
|
|
47
|
+
if (!expoRouterMod) {
|
|
48
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
49
|
+
expoRouterMod = require('expo-router') as ExpoRouterModule
|
|
50
|
+
}
|
|
51
|
+
return expoRouterMod
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** Same debounce as Pay's recipient search; the overlay is not free. */
|
|
55
|
+
const SEARCH_DEBOUNCE_MS = 400
|
|
56
|
+
const SEARCH_MIN_CHARS = 2
|
|
57
|
+
|
|
58
|
+
export function ContactsScreen() {
|
|
59
|
+
const { t } = useTranslation()
|
|
60
|
+
const { colors } = useTheme()
|
|
61
|
+
const insets = useSafeAreaInsets()
|
|
62
|
+
const Ionicons = loadIonicons()
|
|
63
|
+
const { router } = loadExpoRouter()
|
|
64
|
+
const { walletUserId, managers, adminOriginator } = useWallet()
|
|
65
|
+
const store = useContactsStore()
|
|
66
|
+
|
|
67
|
+
const [query, setQuery] = useState('')
|
|
68
|
+
const [rows, setRows] = useState<ContactRow[]>([])
|
|
69
|
+
const [scannerVisible, setScannerVisible] = useState(false)
|
|
70
|
+
const [networkHits, setNetworkHits] = useState<DisplayableIdentity[]>([])
|
|
71
|
+
const [searching, setSearching] = useState(false)
|
|
72
|
+
|
|
73
|
+
const reload = useCallback(async () => {
|
|
74
|
+
if (!store || walletUserId === null) return
|
|
75
|
+
setRows(await store.searchContacts(walletUserId, query))
|
|
76
|
+
}, [store, walletUserId, query])
|
|
77
|
+
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
void reload()
|
|
80
|
+
}, [reload])
|
|
81
|
+
|
|
82
|
+
// The network tier: people you have not saved, found by name on the
|
|
83
|
+
// identity overlay. Decorative relative to the local list — a client that
|
|
84
|
+
// will not build, or a lookup that throws, simply leaves the card out.
|
|
85
|
+
const searchTimer = useRef<ReturnType<typeof setTimeout> | null>(null)
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
if (searchTimer.current) clearTimeout(searchTimer.current)
|
|
88
|
+
const text = query.trim()
|
|
89
|
+
if (text.length < SEARCH_MIN_CHARS) {
|
|
90
|
+
setNetworkHits([])
|
|
91
|
+
setSearching(false)
|
|
92
|
+
return
|
|
93
|
+
}
|
|
94
|
+
const idClient = makeIdentityClient(managers?.permissionsManager as never, adminOriginator)
|
|
95
|
+
if (!idClient) return
|
|
96
|
+
let cancelled = false
|
|
97
|
+
setSearching(true)
|
|
98
|
+
searchTimer.current = setTimeout(async () => {
|
|
99
|
+
try {
|
|
100
|
+
const hits = await searchIdentities(idClient, text)
|
|
101
|
+
if (!cancelled) setNetworkHits(hits)
|
|
102
|
+
} catch {
|
|
103
|
+
if (!cancelled) setNetworkHits([])
|
|
104
|
+
} finally {
|
|
105
|
+
if (!cancelled) setSearching(false)
|
|
106
|
+
}
|
|
107
|
+
}, SEARCH_DEBOUNCE_MS)
|
|
108
|
+
return () => {
|
|
109
|
+
cancelled = true
|
|
110
|
+
}
|
|
111
|
+
}, [query, managers, adminOriginator])
|
|
112
|
+
|
|
113
|
+
const savedKeys = new Set(rows.map(r => r.identityKey))
|
|
114
|
+
const otherPeople = networkHits.filter(h => !savedKeys.has(h.identityKey))
|
|
115
|
+
|
|
116
|
+
const onScan = useCallback(
|
|
117
|
+
(data: string) => {
|
|
118
|
+
const identityKey = parseIdentityKeyFromScan(data)
|
|
119
|
+
if (!identityKey) return
|
|
120
|
+
setScannerVisible(false)
|
|
121
|
+
router.push({ pathname: '/contact/add', params: { identityKey } } as never)
|
|
122
|
+
},
|
|
123
|
+
[router]
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
const openNew = useCallback(
|
|
127
|
+
(identity: DisplayableIdentity) => {
|
|
128
|
+
router.push({
|
|
129
|
+
pathname: '/contact/add',
|
|
130
|
+
params: { identityKey: identity.identityKey, name: identity.name ?? '', source: 'search' }
|
|
131
|
+
} as never)
|
|
132
|
+
},
|
|
133
|
+
[router]
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
const showEmpty = rows.length === 0 && otherPeople.length === 0 && !searching
|
|
137
|
+
|
|
138
|
+
return (
|
|
139
|
+
<View style={[styles.container, { backgroundColor: colors.background, paddingTop: insets.top }]}>
|
|
140
|
+
<View style={[styles.header, { borderBottomColor: colors.separator }]}>
|
|
141
|
+
<PressableScale
|
|
142
|
+
onPress={() => router.back()}
|
|
143
|
+
haptic="tap"
|
|
144
|
+
style={styles.headerBtn}
|
|
145
|
+
accessibilityRole="button"
|
|
146
|
+
accessibilityLabel={t('go_back')}
|
|
147
|
+
>
|
|
148
|
+
<Ionicons
|
|
149
|
+
name={I18nManager.isRTL ? 'chevron-forward' : 'chevron-back'}
|
|
150
|
+
size={24}
|
|
151
|
+
color={colors.textSecondary}
|
|
152
|
+
/>
|
|
153
|
+
</PressableScale>
|
|
154
|
+
<Text style={[styles.headerTitle, { color: colors.textPrimary }]} numberOfLines={1}>
|
|
155
|
+
{t('contacts')}
|
|
156
|
+
</Text>
|
|
157
|
+
<PressableScale
|
|
158
|
+
onPress={() => setScannerVisible(true)}
|
|
159
|
+
haptic="tap"
|
|
160
|
+
style={styles.headerBtn}
|
|
161
|
+
accessibilityRole="button"
|
|
162
|
+
accessibilityLabel={t('contact_scan_hint')}
|
|
163
|
+
>
|
|
164
|
+
<Ionicons name="qr-code-outline" size={22} color={colors.textPrimary} />
|
|
165
|
+
</PressableScale>
|
|
166
|
+
</View>
|
|
167
|
+
|
|
168
|
+
<View style={styles.searchWrap}>
|
|
169
|
+
<View style={[styles.searchRow, { backgroundColor: colors.fillTertiary }]}>
|
|
170
|
+
<Ionicons name="search" size={16} color={colors.textSecondary} />
|
|
171
|
+
<TextInput
|
|
172
|
+
value={query}
|
|
173
|
+
onChangeText={setQuery}
|
|
174
|
+
placeholder={t('contacts_search_placeholder')}
|
|
175
|
+
placeholderTextColor={colors.textTertiary}
|
|
176
|
+
autoCapitalize="none"
|
|
177
|
+
autoCorrect={false}
|
|
178
|
+
returnKeyType="search"
|
|
179
|
+
style={[styles.searchInput, { color: colors.textPrimary }]}
|
|
180
|
+
/>
|
|
181
|
+
{query.length > 0 && (
|
|
182
|
+
<TouchableOpacity
|
|
183
|
+
onPress={() => setQuery('')}
|
|
184
|
+
style={styles.clearBtn}
|
|
185
|
+
hitSlop={8}
|
|
186
|
+
accessibilityRole="button"
|
|
187
|
+
accessibilityLabel={t('cancel')}
|
|
188
|
+
>
|
|
189
|
+
<Ionicons name="close-circle" size={18} color={colors.textTertiary} />
|
|
190
|
+
</TouchableOpacity>
|
|
191
|
+
)}
|
|
192
|
+
</View>
|
|
193
|
+
</View>
|
|
194
|
+
|
|
195
|
+
{showEmpty ? (
|
|
196
|
+
<View style={styles.empty}>
|
|
197
|
+
<Ionicons name="people-outline" size={40} color={colors.textTertiary} />
|
|
198
|
+
<Text style={[styles.emptyTitle, { color: colors.textPrimary }]}>{t('contacts_empty_title')}</Text>
|
|
199
|
+
<Text style={[styles.emptyBody, { color: colors.textSecondary }]}>{t('contacts_empty_body')}</Text>
|
|
200
|
+
</View>
|
|
201
|
+
) : (
|
|
202
|
+
<ScrollView style={styles.list} contentContainerStyle={styles.listContent} keyboardShouldPersistTaps="handled">
|
|
203
|
+
{rows.length > 0 && (
|
|
204
|
+
<GroupedSection header={t('contacts_your_contacts')}>
|
|
205
|
+
{rows.map((row, idx) => (
|
|
206
|
+
<PressableScale
|
|
207
|
+
key={row.identityKey}
|
|
208
|
+
onPress={() =>
|
|
209
|
+
router.push({ pathname: '/contact', params: { identityKey: row.identityKey } } as never)
|
|
210
|
+
}
|
|
211
|
+
scaleTo={0.98}
|
|
212
|
+
haptic="tap"
|
|
213
|
+
accessibilityRole="button"
|
|
214
|
+
>
|
|
215
|
+
<View
|
|
216
|
+
style={[
|
|
217
|
+
styles.row,
|
|
218
|
+
idx < rows.length - 1 && {
|
|
219
|
+
borderBottomWidth: StyleSheet.hairlineWidth,
|
|
220
|
+
borderBottomColor: colors.separator
|
|
221
|
+
}
|
|
222
|
+
]}
|
|
223
|
+
>
|
|
224
|
+
<ContactSigil identityKey={row.identityKey} avatarUrl={row.cachedAvatarUrl} />
|
|
225
|
+
<View style={styles.rowText}>
|
|
226
|
+
<Text style={[styles.rowName, { color: colors.textPrimary }]} numberOfLines={1}>
|
|
227
|
+
{row.name}
|
|
228
|
+
</Text>
|
|
229
|
+
<Text style={[styles.rowSub, { color: colors.textSecondary }]} numberOfLines={1}>
|
|
230
|
+
{row.cachedHandle ? row.cachedHandle : t('contact_no_handle')}
|
|
231
|
+
</Text>
|
|
232
|
+
</View>
|
|
233
|
+
<Ionicons name="chevron-forward" size={18} color={colors.textQuaternary} />
|
|
234
|
+
</View>
|
|
235
|
+
</PressableScale>
|
|
236
|
+
))}
|
|
237
|
+
</GroupedSection>
|
|
238
|
+
)}
|
|
239
|
+
|
|
240
|
+
{(otherPeople.length > 0 || searching) && (
|
|
241
|
+
<GroupedSection
|
|
242
|
+
header={t('contacts_other_people')}
|
|
243
|
+
footer={otherPeople.length > 0 ? t('contacts_network_footer') : undefined}
|
|
244
|
+
>
|
|
245
|
+
{otherPeople.map((hit, idx) => (
|
|
246
|
+
<PressableScale
|
|
247
|
+
key={hit.identityKey}
|
|
248
|
+
onPress={() => openNew(hit)}
|
|
249
|
+
scaleTo={0.98}
|
|
250
|
+
haptic="tap"
|
|
251
|
+
accessibilityRole="button"
|
|
252
|
+
>
|
|
253
|
+
<View
|
|
254
|
+
style={[
|
|
255
|
+
styles.row,
|
|
256
|
+
(idx < otherPeople.length - 1 || searching) && {
|
|
257
|
+
borderBottomWidth: StyleSheet.hairlineWidth,
|
|
258
|
+
borderBottomColor: colors.separator
|
|
259
|
+
}
|
|
260
|
+
]}
|
|
261
|
+
>
|
|
262
|
+
<ContactSigil identityKey={hit.identityKey} avatarUrl={hit.avatarURL || undefined} />
|
|
263
|
+
<View style={styles.rowText}>
|
|
264
|
+
<Text style={[styles.rowName, { color: colors.textPrimary }]} numberOfLines={1}>
|
|
265
|
+
{hit.name || t('unknown')}
|
|
266
|
+
</Text>
|
|
267
|
+
<Text style={[styles.rowSub, styles.mono, { color: colors.textSecondary }]} numberOfLines={1}>
|
|
268
|
+
{hit.abbreviatedKey || abbreviateKey(hit.identityKey)}
|
|
269
|
+
</Text>
|
|
270
|
+
</View>
|
|
271
|
+
<View style={[styles.badge, { backgroundColor: colors.fill }]}>
|
|
272
|
+
<Text style={[styles.badgeText, { color: colors.textPrimary }]}>{t('contacts_not_saved')}</Text>
|
|
273
|
+
</View>
|
|
274
|
+
<Ionicons name="chevron-forward" size={18} color={colors.textQuaternary} />
|
|
275
|
+
</View>
|
|
276
|
+
</PressableScale>
|
|
277
|
+
))}
|
|
278
|
+
{searching && (
|
|
279
|
+
<View style={styles.searchingRow}>
|
|
280
|
+
<ActivityIndicator size="small" color={colors.textSecondary} />
|
|
281
|
+
<Text style={[styles.searchingText, { color: colors.textSecondary }]}>{t('searching')}</Text>
|
|
282
|
+
</View>
|
|
283
|
+
)}
|
|
284
|
+
</GroupedSection>
|
|
285
|
+
)}
|
|
286
|
+
</ScrollView>
|
|
287
|
+
)}
|
|
288
|
+
|
|
289
|
+
{/* The one manual-entry door into Contacts (2026-09-18) — every other
|
|
290
|
+
path (scan, deep link, search, a payment's success screen) already
|
|
291
|
+
knows the identity key. */}
|
|
292
|
+
<View style={[styles.footer, { paddingBottom: Math.max(insets.bottom, spacing.lg) }]}>
|
|
293
|
+
<PressableScale
|
|
294
|
+
onPress={() => router.push('/contact/add' as never)}
|
|
295
|
+
haptic="tap"
|
|
296
|
+
style={[styles.newContactBtn, { backgroundColor: colors.accent }]}
|
|
297
|
+
accessibilityRole="button"
|
|
298
|
+
>
|
|
299
|
+
<Ionicons name="person-add-outline" size={18} color={colors.textOnAccent} />
|
|
300
|
+
<Text style={[styles.newContactText, { color: colors.textOnAccent }]}>{t('contact_new_title')}</Text>
|
|
301
|
+
</PressableScale>
|
|
302
|
+
</View>
|
|
303
|
+
|
|
304
|
+
<Modal visible={scannerVisible} animationType="slide" onRequestClose={() => setScannerVisible(false)}>
|
|
305
|
+
<QRScanner onScan={onScan} onClose={() => setScannerVisible(false)} hintText={t('contact_scan_hint')} />
|
|
306
|
+
</Modal>
|
|
307
|
+
</View>
|
|
308
|
+
)
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export default ContactsScreen
|
|
312
|
+
|
|
313
|
+
const styles = StyleSheet.create({
|
|
314
|
+
container: { flex: 1 },
|
|
315
|
+
header: {
|
|
316
|
+
flexDirection: 'row',
|
|
317
|
+
alignItems: 'center',
|
|
318
|
+
justifyContent: 'space-between',
|
|
319
|
+
paddingHorizontal: spacing.sm,
|
|
320
|
+
paddingVertical: spacing.md,
|
|
321
|
+
borderBottomWidth: StyleSheet.hairlineWidth
|
|
322
|
+
},
|
|
323
|
+
headerBtn: { width: 44, height: 44, alignItems: 'center', justifyContent: 'center' },
|
|
324
|
+
headerTitle: { ...typography.headline, fontWeight: '600', flex: 1, textAlign: 'center' },
|
|
325
|
+
searchWrap: { paddingHorizontal: spacing.lg, paddingTop: spacing.md, paddingBottom: spacing.lg },
|
|
326
|
+
searchRow: {
|
|
327
|
+
flexDirection: 'row',
|
|
328
|
+
alignItems: 'center',
|
|
329
|
+
gap: spacing.sm,
|
|
330
|
+
borderRadius: radii.md,
|
|
331
|
+
paddingHorizontal: spacing.md,
|
|
332
|
+
minHeight: 40
|
|
333
|
+
},
|
|
334
|
+
searchInput: { ...typography.body, flex: 1, paddingVertical: spacing.sm, paddingHorizontal: 0 },
|
|
335
|
+
clearBtn: { width: 28, height: 28, alignItems: 'center', justifyContent: 'center' },
|
|
336
|
+
list: { flex: 1 },
|
|
337
|
+
listContent: { paddingBottom: spacing.lg },
|
|
338
|
+
row: {
|
|
339
|
+
flexDirection: 'row',
|
|
340
|
+
alignItems: 'center',
|
|
341
|
+
gap: spacing.md,
|
|
342
|
+
minHeight: 58,
|
|
343
|
+
paddingVertical: spacing.sm + 2,
|
|
344
|
+
paddingHorizontal: spacing.lg
|
|
345
|
+
},
|
|
346
|
+
rowText: { flex: 1, minWidth: 0, gap: 2 },
|
|
347
|
+
rowName: { ...typography.body },
|
|
348
|
+
rowSub: { ...typography.footnote },
|
|
349
|
+
mono: { fontFamily: 'monospace', fontSize: 12 },
|
|
350
|
+
badge: { paddingHorizontal: 7, paddingVertical: 3, borderRadius: 6 },
|
|
351
|
+
badgeText: { ...typography.caption2, fontWeight: '600' },
|
|
352
|
+
searchingRow: {
|
|
353
|
+
flexDirection: 'row',
|
|
354
|
+
alignItems: 'center',
|
|
355
|
+
justifyContent: 'center',
|
|
356
|
+
gap: spacing.sm,
|
|
357
|
+
paddingVertical: spacing.md
|
|
358
|
+
},
|
|
359
|
+
searchingText: { ...typography.subhead },
|
|
360
|
+
empty: { flex: 1, alignItems: 'center', justifyContent: 'center', gap: spacing.sm, paddingHorizontal: spacing.xxl },
|
|
361
|
+
emptyTitle: { ...typography.headline, fontWeight: '600', marginTop: spacing.sm },
|
|
362
|
+
emptyBody: { ...typography.footnote, textAlign: 'center' },
|
|
363
|
+
footer: { paddingHorizontal: spacing.lg, paddingTop: spacing.sm },
|
|
364
|
+
newContactBtn: {
|
|
365
|
+
flexDirection: 'row',
|
|
366
|
+
alignItems: 'center',
|
|
367
|
+
justifyContent: 'center',
|
|
368
|
+
gap: spacing.sm,
|
|
369
|
+
paddingVertical: spacing.md + 2,
|
|
370
|
+
borderRadius: radii.md
|
|
371
|
+
},
|
|
372
|
+
newContactText: { ...typography.subhead, fontWeight: '600' }
|
|
373
|
+
})
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Your Identifier as a QR: a deep link straight to another wallet's
|
|
3
|
+
* add-contact screen (`bsv-wallet://contact/add?identityKey=…`, 2026-09-18
|
|
4
|
+
* ruling), never the bare key and never a payment request. Copy and Share
|
|
5
|
+
* carry the same link; the callout says what scanning it does and does not do.
|
|
6
|
+
*/
|
|
7
|
+
import React, { useCallback, useEffect, useState } from 'react'
|
|
8
|
+
import { I18nManager, Share, StyleSheet, Text, View } from 'react-native'
|
|
9
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
|
10
|
+
import { useTranslation } from 'react-i18next'
|
|
11
|
+
import { useTheme, spacing, radii, typography, useWallet } from '@bsv/expo-wallet-toolbox'
|
|
12
|
+
import PressableScale from '../components/ui/PressableScale'
|
|
13
|
+
import { showToast } from '../components/ui/Toast'
|
|
14
|
+
import { contactAddLinkFor } from '../../core/identity/contactLink'
|
|
15
|
+
import { abbreviateKey } from '../../core/pay/counterparty'
|
|
16
|
+
|
|
17
|
+
type IoniconsComponent = typeof import('@expo/vector-icons').Ionicons
|
|
18
|
+
let ioniconsComponent: IoniconsComponent | undefined
|
|
19
|
+
function loadIonicons(): IoniconsComponent {
|
|
20
|
+
if (!ioniconsComponent) {
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
22
|
+
ioniconsComponent = require('@expo/vector-icons').Ionicons as IoniconsComponent
|
|
23
|
+
}
|
|
24
|
+
return ioniconsComponent
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
type QRCodeComponent = typeof import('react-native-qrcode-svg').default
|
|
28
|
+
let qrCodeComponent: QRCodeComponent | undefined
|
|
29
|
+
function loadQRCode(): QRCodeComponent {
|
|
30
|
+
if (!qrCodeComponent) {
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
32
|
+
const mod = require('react-native-qrcode-svg')
|
|
33
|
+
qrCodeComponent = (mod?.default ?? mod) as QRCodeComponent
|
|
34
|
+
}
|
|
35
|
+
return qrCodeComponent
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
type ExpoRouterModule = typeof import('expo-router')
|
|
39
|
+
let expoRouterMod: ExpoRouterModule | undefined
|
|
40
|
+
function loadExpoRouter(): ExpoRouterModule {
|
|
41
|
+
if (!expoRouterMod) {
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
43
|
+
expoRouterMod = require('expo-router') as ExpoRouterModule
|
|
44
|
+
}
|
|
45
|
+
return expoRouterMod
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
type ClipboardModule = typeof import('@react-native-clipboard/clipboard').default
|
|
49
|
+
let clipboardModule: ClipboardModule | undefined
|
|
50
|
+
function loadClipboard(): ClipboardModule {
|
|
51
|
+
if (!clipboardModule) {
|
|
52
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
53
|
+
clipboardModule = require('@react-native-clipboard/clipboard').default as ClipboardModule
|
|
54
|
+
}
|
|
55
|
+
return clipboardModule
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function firstParam(v: string | string[] | undefined): string | undefined {
|
|
59
|
+
return Array.isArray(v) ? v[0] : v
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const QR_SIZE = 240
|
|
63
|
+
|
|
64
|
+
export function IdentifierScreen() {
|
|
65
|
+
const { t } = useTranslation()
|
|
66
|
+
const { colors } = useTheme()
|
|
67
|
+
const insets = useSafeAreaInsets()
|
|
68
|
+
const Ionicons = loadIonicons()
|
|
69
|
+
const QRCode = loadQRCode()
|
|
70
|
+
const { router, useLocalSearchParams } = loadExpoRouter()
|
|
71
|
+
const { managers, adminOriginator } = useWallet()
|
|
72
|
+
const params = useLocalSearchParams<{
|
|
73
|
+
identityKey?: string | string[]
|
|
74
|
+
name?: string | string[]
|
|
75
|
+
handle?: string | string[]
|
|
76
|
+
}>()
|
|
77
|
+
const routeIdentityKey = firstParam(params.identityKey) ?? ''
|
|
78
|
+
const routeName = firstParam(params.name) ?? ''
|
|
79
|
+
const routeHandle = firstParam(params.handle) ?? ''
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The route's `identityKey` is untrusted input, not a value this screen can
|
|
83
|
+
* act on directly: this is "Your Identifier", reached from a deep link
|
|
84
|
+
* (`app/identifier.tsx`, via `resolveNativeIntent`) that carries no
|
|
85
|
+
* blocklist for it, and Profile's own push of its already-known key is only
|
|
86
|
+
* an optimization, not the source of truth. So the wallet's own key is
|
|
87
|
+
* always fetched, and it is the ONLY value ever used to build the QR/copy/
|
|
88
|
+
* share link — the route value is never rendered there, only compared
|
|
89
|
+
* against it (XR-070 / SEC2-061).
|
|
90
|
+
*/
|
|
91
|
+
const [walletKey, setWalletKey] = useState<string | null>(null)
|
|
92
|
+
useEffect(() => {
|
|
93
|
+
const wallet = managers?.permissionsManager
|
|
94
|
+
if (!wallet || typeof wallet.getPublicKey !== 'function') return
|
|
95
|
+
let cancelled = false
|
|
96
|
+
void wallet.getPublicKey({ identityKey: true }, adminOriginator).then(r => {
|
|
97
|
+
if (!cancelled && r?.publicKey) setWalletKey(r.publicKey)
|
|
98
|
+
})
|
|
99
|
+
return () => {
|
|
100
|
+
cancelled = true
|
|
101
|
+
}
|
|
102
|
+
}, [managers, adminOriginator])
|
|
103
|
+
|
|
104
|
+
const identityKey = walletKey ?? ''
|
|
105
|
+
// The route's name/handle are cosmetic labels, but they are shown only when
|
|
106
|
+
// the route's identityKey hint actually matches the wallet's own resolved
|
|
107
|
+
// key — otherwise they are exactly as untrustworthy as the key would have
|
|
108
|
+
// been, and abbreviateKey(identityKey) below already covers "no label yet".
|
|
109
|
+
const routeMatchesWallet = walletKey !== null && routeIdentityKey.toLowerCase() === walletKey.toLowerCase()
|
|
110
|
+
const name = routeMatchesWallet ? routeName : ''
|
|
111
|
+
const handle = routeMatchesWallet ? routeHandle : ''
|
|
112
|
+
|
|
113
|
+
const link = identityKey ? contactAddLinkFor(identityKey) : ''
|
|
114
|
+
|
|
115
|
+
const onCopy = useCallback(() => {
|
|
116
|
+
if (!link) return
|
|
117
|
+
loadClipboard().setString(link)
|
|
118
|
+
showToast(t('copied'), { type: 'success' })
|
|
119
|
+
}, [link, t])
|
|
120
|
+
|
|
121
|
+
const onShare = useCallback(async () => {
|
|
122
|
+
if (!link) return
|
|
123
|
+
try {
|
|
124
|
+
await Share.share({ message: link })
|
|
125
|
+
} catch {
|
|
126
|
+
// The sheet was dismissed; nothing to report.
|
|
127
|
+
}
|
|
128
|
+
}, [link])
|
|
129
|
+
|
|
130
|
+
return (
|
|
131
|
+
<View style={[styles.container, { backgroundColor: colors.background, paddingTop: insets.top }]}>
|
|
132
|
+
<View style={[styles.header, { borderBottomColor: colors.separator }]}>
|
|
133
|
+
<PressableScale
|
|
134
|
+
onPress={() => router.back()}
|
|
135
|
+
haptic="tap"
|
|
136
|
+
style={styles.headerBtn}
|
|
137
|
+
accessibilityRole="button"
|
|
138
|
+
accessibilityLabel={t('go_back')}
|
|
139
|
+
>
|
|
140
|
+
<Ionicons
|
|
141
|
+
name={I18nManager.isRTL ? 'chevron-forward' : 'chevron-back'}
|
|
142
|
+
size={24}
|
|
143
|
+
color={colors.textSecondary}
|
|
144
|
+
/>
|
|
145
|
+
</PressableScale>
|
|
146
|
+
<Text style={[styles.headerTitle, { color: colors.textPrimary }]} numberOfLines={1}>
|
|
147
|
+
{t('profile_identifier_section')}
|
|
148
|
+
</Text>
|
|
149
|
+
<View style={styles.headerBtn} />
|
|
150
|
+
</View>
|
|
151
|
+
|
|
152
|
+
<View style={styles.body}>
|
|
153
|
+
<View style={styles.who}>
|
|
154
|
+
<View style={[styles.whoDisc, { backgroundColor: colors.accent }]}>
|
|
155
|
+
<Ionicons name="person" size={20} color={colors.textOnAccent} />
|
|
156
|
+
</View>
|
|
157
|
+
<View>
|
|
158
|
+
<Text style={[styles.whoName, { color: colors.textPrimary }]} numberOfLines={1}>
|
|
159
|
+
{name || abbreviateKey(identityKey)}
|
|
160
|
+
</Text>
|
|
161
|
+
{!!handle && <Text style={[styles.whoHandle, { color: colors.textSecondary }]}>{handle}</Text>}
|
|
162
|
+
</View>
|
|
163
|
+
</View>
|
|
164
|
+
|
|
165
|
+
<View style={[styles.plate, { borderColor: colors.separator }]}>
|
|
166
|
+
{!!link && <QRCode value={link} size={QR_SIZE} color="#000" backgroundColor="#fff" />}
|
|
167
|
+
</View>
|
|
168
|
+
|
|
169
|
+
<Text style={[styles.link, { color: colors.textSecondary }]} numberOfLines={1} ellipsizeMode="middle">
|
|
170
|
+
{link}
|
|
171
|
+
</Text>
|
|
172
|
+
|
|
173
|
+
<View style={styles.actions}>
|
|
174
|
+
<PressableScale
|
|
175
|
+
onPress={onCopy}
|
|
176
|
+
haptic="tap"
|
|
177
|
+
style={[styles.actionBtn, { backgroundColor: colors.fillTertiary }]}
|
|
178
|
+
accessibilityRole="button"
|
|
179
|
+
>
|
|
180
|
+
<Ionicons name="copy-outline" size={18} color={colors.textPrimary} />
|
|
181
|
+
<Text style={[styles.actionLabel, { color: colors.textPrimary }]}>{t('copy')}</Text>
|
|
182
|
+
</PressableScale>
|
|
183
|
+
<PressableScale
|
|
184
|
+
onPress={onShare}
|
|
185
|
+
haptic="tap"
|
|
186
|
+
style={[styles.actionBtn, { backgroundColor: colors.fillTertiary }]}
|
|
187
|
+
accessibilityRole="button"
|
|
188
|
+
>
|
|
189
|
+
<Ionicons name="share-outline" size={18} color={colors.textPrimary} />
|
|
190
|
+
<Text style={[styles.actionLabel, { color: colors.textPrimary }]}>{t('share')}</Text>
|
|
191
|
+
</PressableScale>
|
|
192
|
+
</View>
|
|
193
|
+
|
|
194
|
+
<View style={[styles.callout, { backgroundColor: colors.fillTertiary, borderColor: colors.separator }]}>
|
|
195
|
+
<Ionicons name="information-circle-outline" size={16} color={colors.textSecondary} />
|
|
196
|
+
<Text style={[styles.calloutText, { color: colors.textSecondary }]}>{t('profile_qr_callout')}</Text>
|
|
197
|
+
</View>
|
|
198
|
+
</View>
|
|
199
|
+
</View>
|
|
200
|
+
)
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export default IdentifierScreen
|
|
204
|
+
|
|
205
|
+
const styles = StyleSheet.create({
|
|
206
|
+
container: { flex: 1 },
|
|
207
|
+
header: {
|
|
208
|
+
flexDirection: 'row',
|
|
209
|
+
alignItems: 'center',
|
|
210
|
+
justifyContent: 'space-between',
|
|
211
|
+
paddingHorizontal: spacing.sm,
|
|
212
|
+
paddingVertical: spacing.md,
|
|
213
|
+
borderBottomWidth: StyleSheet.hairlineWidth
|
|
214
|
+
},
|
|
215
|
+
headerBtn: { width: 44, height: 44, alignItems: 'center', justifyContent: 'center' },
|
|
216
|
+
headerTitle: { ...typography.headline, fontWeight: '600', flex: 1, textAlign: 'center' },
|
|
217
|
+
body: { alignItems: 'center', gap: spacing.lg, paddingHorizontal: spacing.xl, paddingTop: spacing.xl },
|
|
218
|
+
who: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm + 2 },
|
|
219
|
+
whoDisc: { width: 40, height: 40, borderRadius: 20, alignItems: 'center', justifyContent: 'center' },
|
|
220
|
+
whoName: { ...typography.headline, fontWeight: '600' },
|
|
221
|
+
whoHandle: { ...typography.footnote },
|
|
222
|
+
// The plate stays white in both themes: a QR is read by a camera, not by a person.
|
|
223
|
+
plate: {
|
|
224
|
+
padding: spacing.lg,
|
|
225
|
+
borderRadius: radii.xl,
|
|
226
|
+
backgroundColor: '#fff',
|
|
227
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
228
|
+
width: QR_SIZE + spacing.lg * 2,
|
|
229
|
+
height: QR_SIZE + spacing.lg * 2,
|
|
230
|
+
alignItems: 'center',
|
|
231
|
+
justifyContent: 'center'
|
|
232
|
+
},
|
|
233
|
+
link: { ...typography.caption1, fontFamily: 'monospace', textAlign: 'center', maxWidth: '100%' },
|
|
234
|
+
actions: { flexDirection: 'row', gap: spacing.sm, alignSelf: 'stretch' },
|
|
235
|
+
actionBtn: {
|
|
236
|
+
flex: 1,
|
|
237
|
+
flexDirection: 'row',
|
|
238
|
+
alignItems: 'center',
|
|
239
|
+
justifyContent: 'center',
|
|
240
|
+
gap: spacing.xs,
|
|
241
|
+
minHeight: 44,
|
|
242
|
+
borderRadius: radii.md
|
|
243
|
+
},
|
|
244
|
+
actionLabel: { ...typography.subhead, fontWeight: '500' },
|
|
245
|
+
callout: {
|
|
246
|
+
flexDirection: 'row',
|
|
247
|
+
alignItems: 'center',
|
|
248
|
+
gap: spacing.sm,
|
|
249
|
+
alignSelf: 'stretch',
|
|
250
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
251
|
+
borderRadius: radii.md,
|
|
252
|
+
paddingVertical: spacing.sm + 2,
|
|
253
|
+
paddingHorizontal: spacing.md
|
|
254
|
+
},
|
|
255
|
+
calloutText: { ...typography.footnote, flex: 1 }
|
|
256
|
+
})
|