@bsv/expo-wallet-toolbox 0.19.0 → 0.21.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 +154 -30
- package/README.md +79 -79
- package/core/backup/RemoteSyncReader.ts +26 -24
- package/core/backup/appData.ts +9 -8
- package/core/backup/codec.ts +21 -18
- package/core/backup/constants.ts +5 -5
- package/core/backup/contactsBackup.ts +8 -8
- package/core/backup/cursor.ts +12 -7
- package/core/backup/derive.ts +3 -3
- package/core/backup/deviceId.ts +2 -2
- package/core/backup/erase.ts +2 -2
- package/core/backup/preference.ts +2 -2
- package/core/backup/push.ts +10 -12
- package/core/backup/restore.ts +22 -14
- package/core/backup/restoreOnImport.ts +3 -2
- package/core/config.tsx +17 -13
- package/core/constants.ts +34 -11
- package/core/contacts/contactsStore.ts +4 -3
- package/core/context/WalletConnectionContext.tsx +294 -212
- package/core/context/WalletContext.tsx +132 -97
- package/core/context/defaultWalletSettings.ts +4 -2
- package/core/demo/demoLedger.ts +1 -5
- package/core/directpay/DirectPayManager.ts +148 -29
- package/core/directpay/DirectPayProvider.tsx +26 -26
- package/core/directpay/payFlow.ts +10 -1
- package/core/directpay/receive.ts +2 -1
- package/core/directpay/settings.ts +56 -9
- package/core/directpay/types.ts +11 -2
- package/core/directpay/webrtpay.ts +4 -0
- package/core/headers/checkpoints.ts +10 -1
- package/core/headers/headerStore.ts +13 -2
- package/core/hooks/useConfirmationSound.ts +3 -3
- package/core/hooks/useHaptics.ts +23 -6
- package/core/i18n/translations.tsx +382 -209
- package/core/index.ts +2 -0
- package/core/localpay/codec.ts +12 -6
- package/core/localpay/deviceCaps.ts +4 -14
- package/core/localpay/pending.ts +2 -1
- package/core/localpay/qr.ts +1 -1
- package/core/localpay/settlementAck.ts +1 -4
- package/core/localpay/transport/ble.ts +2 -2
- package/core/localpay/transport/socket.ts +1 -1
- package/core/mandala/abortGuard.ts +1 -1
- package/core/mandala/drain.ts +3 -0
- package/core/mandala/permissionModule.ts +3 -2
- package/core/mandala/resendTransfer.ts +4 -1
- package/core/mandala/runtime.ts +4 -4
- package/core/monitor/TaskBackupPush.ts +10 -13
- package/core/net/chainMatch.ts +8 -5
- package/core/networks.ts +145 -0
- package/core/parsePeerPayURI.ts +4 -1
- package/core/pay/beefRepair.ts +6 -3
- package/core/pay/creditErrors.ts +37 -1
- package/core/pay/rails/address.ts +10 -6
- package/core/pay/rails/direct.ts +6 -2
- package/core/pay/rails/handle.ts +84 -11
- package/core/pay/rails/index.ts +18 -2
- package/core/pay/receiveHistory.ts +8 -8
- package/core/peerpay/handleResendRequests.ts +11 -18
- package/core/peerpay/inboxAttempts.ts +1 -4
- package/core/peerpay/rebuildToken.ts +12 -9
- package/core/profiles/profileStore.ts +2 -1
- package/core/profiles/removalProblems.ts +3 -1
- package/core/services/arcTokenStorage.ts +2 -1
- package/core/services/arcadeBroadcastProvider.ts +7 -17
- package/core/services/secrets/envelope.ts +1 -6
- package/core/services/secrets/hkdf.ts +1 -6
- package/core/services/secrets/index.ts +3 -22
- package/core/services/usdFxRates.ts +1 -4
- package/core/services/vault/VaultKeyService.ts +2 -1
- package/core/services/vault/chainRecovery.ts +48 -21
- package/core/services/vault/metaAuthority.ts +4 -1
- package/core/services/vault/r1comb.ts +113 -51
- package/core/services/vault/session.ts +5 -1
- package/core/services/vault/transfers.ts +699 -576
- package/core/services/vault/vaultStore.ts +12 -10
- package/core/services/walletArgLimits.ts +1 -2
- package/core/services/walletConnectionValidation.ts +44 -28
- package/core/services/walletServiceConfig.ts +9 -40
- package/core/storage/StorageExpoSQLite.ts +7 -21
- package/core/storage/methods/listActionsSql.ts +81 -67
- package/core/storage/methods/listOutputsSql.ts +21 -16
- package/core/storage/methods/reviewStatusSql.ts +1 -4
- package/core/stores/ConnectionStore.ts +1 -1
- package/core/theme/ThemeContext.tsx +12 -16
- package/core/theme/motion.ts +3 -3
- package/core/theme/tokens.ts +6 -6
- package/core/toolboxConfig.ts +23 -0
- package/core/walletDbRegistry.ts +7 -5
- package/core/walletRepair/runWalletCheck.ts +1 -4
- package/package.json +2 -2
- package/ui/components/pay/AddressReceive.tsx +3 -3
- package/ui/components/pay/HandleReceive.tsx +21 -15
- package/ui/components/pay/MessageBoxConfig.tsx +46 -20
- package/ui/components/pay/NearbyFlow.tsx +575 -507
- package/ui/components/pay/OfflineNotice.tsx +1 -3
- package/ui/components/pay/PayCellRow.tsx +1 -4
- package/ui/components/pay/PayForm.tsx +1 -3
- package/ui/components/pay/RequestHub.tsx +14 -6
- package/ui/components/pay/UniversalSend.tsx +79 -27
- package/ui/components/pay/tokenSendCopy.ts +1 -2
- package/ui/components/pay/useRecipientInput.ts +2 -2
- package/ui/components/security/WalletLockNotice.tsx +1 -3
- package/ui/components/ui/AlertCard.tsx +44 -45
- package/ui/components/ui/BlurChrome.tsx +4 -15
- package/ui/components/ui/Celebration.tsx +3 -3
- package/ui/components/ui/ChoiceSheet.ts +1 -3
- package/ui/components/ui/ErrorBoundary.tsx +2 -6
- package/ui/components/ui/GroupedList.tsx +13 -31
- package/ui/components/ui/IconButton.tsx +6 -9
- package/ui/components/ui/ListRow.tsx +19 -25
- package/ui/components/ui/PresenceRow.tsx +4 -4
- package/ui/components/ui/PressableScale.tsx +24 -20
- package/ui/components/ui/Toast.tsx +23 -16
- package/ui/components/vault/KeyChooser.tsx +9 -6
- package/ui/components/vault/VaultBackdrop.tsx +1 -8
- package/ui/components/vault/VaultCeremonySheet.tsx +5 -5
- package/ui/components/wallet/ActivityRow.tsx +3 -2
- package/ui/components/wallet/BackupReminderSheet.tsx +1 -5
- package/ui/components/wallet/Balance.tsx +4 -1
- package/ui/components/wallet/ContactActivityList.tsx +7 -7
- package/ui/components/wallet/IconPickerSheet.tsx +1 -5
- package/ui/components/wallet/ProfileSwitcherPopover.tsx +6 -1
- package/ui/components/wallet/tokenEviction.ts +4 -1
- package/ui/hooks/useMandala.ts +1 -7
- package/ui/hooks/useOfflineNoticeActions.ts +21 -27
- package/ui/hooks/useSpendableBalance.ts +2 -2
- package/ui/hooks/useVaultCoverage.ts +7 -1
- package/ui/index.ts +9 -1
- package/ui/resolveIdentity.ts +20 -8
- package/ui/screens/ConnectionsScreen.tsx +44 -18
- package/ui/screens/LogsScreen.tsx +24 -22
- package/ui/screens/PairScreen.tsx +85 -54
- package/ui/screens/PayScreen.tsx +5 -1
- package/ui/screens/ProfileScreen.tsx +0 -3
- package/ui/screens/TrustScreen.tsx +125 -80
- package/ui/screens/VaultScreen.tsx +19 -7
- package/ui/screens/VaultTransferScreen.tsx +5 -1
- package/ui/screens/WalletCheckScreen.tsx +14 -17
- package/ui/screens/WalletConfigScreen.tsx +414 -376
- package/ui/screens/WalletHomeScreen.tsx +47 -42
|
@@ -43,7 +43,7 @@ const TONES = {
|
|
|
43
43
|
paymentReceive: require('../../assets/sounds/payment-receive.wav'),
|
|
44
44
|
paymentSend: require('../../assets/sounds/payment-send.wav'),
|
|
45
45
|
vaultDeposit: require('../../assets/sounds/vault-deposit.wav'),
|
|
46
|
-
vaultWithdraw: require('../../assets/sounds/vault-withdraw.wav')
|
|
46
|
+
vaultWithdraw: require('../../assets/sounds/vault-withdraw.wav')
|
|
47
47
|
} as const
|
|
48
48
|
|
|
49
49
|
type ToneName = keyof typeof TONES
|
|
@@ -97,7 +97,7 @@ function playTone(name: ToneName): void {
|
|
|
97
97
|
playsInSilentMode: false,
|
|
98
98
|
interruptionMode: 'mixWithOthers',
|
|
99
99
|
shouldPlayInBackground: false,
|
|
100
|
-
allowsRecording: false
|
|
100
|
+
allowsRecording: false
|
|
101
101
|
})
|
|
102
102
|
modeSet = true
|
|
103
103
|
}
|
|
@@ -142,7 +142,7 @@ export const sounds = {
|
|
|
142
142
|
/** A host's sounds setting: off silences every tone until it's turned on again. */
|
|
143
143
|
setEnabled: (on: boolean) => {
|
|
144
144
|
enabled = on
|
|
145
|
-
}
|
|
145
|
+
}
|
|
146
146
|
} as const
|
|
147
147
|
|
|
148
148
|
export const useConfirmationSound = () => useMemo(() => sounds, [])
|
package/core/hooks/useHaptics.ts
CHANGED
|
@@ -35,15 +35,32 @@ function load(): HapticsModule | null {
|
|
|
35
35
|
return mod
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
const swallow = (p: Promise<void>) => {
|
|
38
|
+
const swallow = (p: Promise<void>) => {
|
|
39
|
+
p.catch(() => {})
|
|
40
|
+
}
|
|
39
41
|
const isIOS = () => Platform.OS === 'ios'
|
|
40
42
|
|
|
41
43
|
export const haptics = {
|
|
42
|
-
tap: () => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
tap: () => {
|
|
45
|
+
const h = load()
|
|
46
|
+
if (h && isIOS()) swallow(h.selectionAsync())
|
|
47
|
+
},
|
|
48
|
+
confirm: () => {
|
|
49
|
+
const h = load()
|
|
50
|
+
if (h && isIOS()) swallow(h.impactAsync(h.ImpactFeedbackStyle.Light))
|
|
51
|
+
},
|
|
52
|
+
success: () => {
|
|
53
|
+
const h = load()
|
|
54
|
+
if (h) swallow(h.notificationAsync(h.NotificationFeedbackType.Success))
|
|
55
|
+
},
|
|
56
|
+
warning: () => {
|
|
57
|
+
const h = load()
|
|
58
|
+
if (h) swallow(h.notificationAsync(h.NotificationFeedbackType.Warning))
|
|
59
|
+
},
|
|
60
|
+
error: () => {
|
|
61
|
+
const h = load()
|
|
62
|
+
if (h) swallow(h.notificationAsync(h.NotificationFeedbackType.Error))
|
|
63
|
+
}
|
|
47
64
|
} as const
|
|
48
65
|
|
|
49
66
|
export type HapticName = keyof typeof haptics
|