From b6ed33ee5b99fe8ae097f8256e948e1ed9e1c3b5 Mon Sep 17 00:00:00 2001 From: Matthew Date: Mon, 10 Nov 2025 14:11:10 -0800 Subject: [PATCH 1/2] Fix eslint errors in WalletAndCurrencyConstants.ts --- eslint.config.mjs | 4 ++-- src/constants/WalletAndCurrencyConstants.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index dbf31d72619..9db0b0ce7c1 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -336,7 +336,7 @@ export default [ 'src/components/text/TitleText.tsx', 'src/components/themed/Alert.tsx', - 'src/components/themed/BuyCrypto.tsx', + 'src/components/themed/CreateWalletSelectCryptoRow.tsx', 'src/components/themed/DividerLine.tsx', 'src/components/themed/EdgeProviderComponent.tsx', @@ -395,7 +395,7 @@ export default [ 'src/components/tiles/LtvRatioTile.tsx', 'src/components/tiles/PercentageChangeArrowTile.tsx', 'src/components/tiles/TotalDebtCollateralTile.tsx', - 'src/constants/WalletAndCurrencyConstants.ts', + 'src/controllers/action-queue/ActionQueueStore.ts', 'src/controllers/action-queue/cleaners.ts', 'src/controllers/action-queue/push.ts', diff --git a/src/constants/WalletAndCurrencyConstants.ts b/src/constants/WalletAndCurrencyConstants.ts index 3f4eb2d0497..085e81de95d 100644 --- a/src/constants/WalletAndCurrencyConstants.ts +++ b/src/constants/WalletAndCurrencyConstants.ts @@ -200,7 +200,7 @@ interface SpecialCurrencyInfo { export const getSpecialCurrencyInfo = ( pluginId: string ): SpecialCurrencyInfo => { - if (SPECIAL_CURRENCY_INFO[pluginId]) { + if (SPECIAL_CURRENCY_INFO[pluginId] !== undefined) { return SPECIAL_CURRENCY_INFO[pluginId] } else { return { @@ -973,7 +973,7 @@ export const USD_FIAT = 'iso:USD' /** * Get the fiat symbol from an iso:[fiat] OR fiat currency code */ -export const getFiatSymbol = (isoOrFiatCurrencyCode: string) => { +export const getFiatSymbol = (isoOrFiatCurrencyCode: string): string => { if (typeof isoOrFiatCurrencyCode !== 'string') return '' const codeWithoutIso = removeIsoPrefix(isoOrFiatCurrencyCode) const out = FIAT_CODES_SYMBOLS[codeWithoutIso.toUpperCase()] From fd0dd615a30c24f561fab21b03d8a4654a22ab2a Mon Sep 17 00:00:00 2001 From: Matthew Date: Mon, 10 Nov 2025 14:13:52 -0800 Subject: [PATCH 2/2] Add high precision syncRatio display for Piratechain Old wallets can take a long time to load. Showing more precision will show that the synchronizer is still working --- src/components/themed/BuyCrypto.tsx | 10 +++++++++- src/constants/WalletAndCurrencyConstants.ts | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/themed/BuyCrypto.tsx b/src/components/themed/BuyCrypto.tsx index ee94d925d79..87c78f2911a 100644 --- a/src/components/themed/BuyCrypto.tsx +++ b/src/components/themed/BuyCrypto.tsx @@ -55,6 +55,14 @@ export const BuyCrypto: React.FC = (props: Props) => { }) const { displayName, pluginId } = wallet.currencyInfo + const { highPrecisionSyncRatioDisplay = false } = + SPECIAL_CURRENCY_INFO[pluginId] + const syncRatioPrecisionOpts = highPrecisionSyncRatioDisplay + ? { + minPrecision: 5, + maxPrecision: 5 + } + : undefined return ( <> @@ -87,7 +95,7 @@ export const BuyCrypto: React.FC = (props: Props) => { {sprintf( lstrings.percent_complete_1s, - toPercentString(syncRatio) + toPercentString(syncRatio, syncRatioPrecisionOpts) )} diff --git a/src/constants/WalletAndCurrencyConstants.ts b/src/constants/WalletAndCurrencyConstants.ts index 085e81de95d..da9ff2af33d 100644 --- a/src/constants/WalletAndCurrencyConstants.ts +++ b/src/constants/WalletAndCurrencyConstants.ts @@ -167,6 +167,7 @@ interface SpecialCurrencyInfo { noChangeMiningFee?: boolean noMaxSpend?: boolean keysOnlyMode?: boolean + highPrecisionSyncRatioDisplay?: boolean /** * This disables the transaction list for the wallet. * (Default: false) @@ -832,6 +833,7 @@ export const SPECIAL_CURRENCY_INFO: Record = { noChangeMiningFee: true, isImportKeySupported: true, keysOnlyMode: Platform.OS === 'android' && Platform.constants.Version < 28, + highPrecisionSyncRatioDisplay: true, importKeyOptions: [ { optionName: 'birthdayHeight',