Skip to content

Conversation

@peachbits
Copy link
Contributor

@peachbits peachbits commented Nov 10, 2025

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

Note

Displays sync progress with 5-decimal precision for Piratechain wallets, gated by a new SpecialCurrencyInfo flag, plus minor typing tweaks.

  • UI:
    • src/components/themed/BuyCrypto.tsx: Shows sync progress using toPercentString(syncRatio, { minPrecision: 5, maxPrecision: 5 }) when SPECIAL_CURRENCY_INFO[pluginId].highPrecisionSyncRatioDisplay is true.
  • Constants:
    • src/constants/WalletAndCurrencyConstants.ts:
      • Add highPrecisionSyncRatioDisplay to SpecialCurrencyInfo and enable it for piratechain.
      • Use strict undefined check in getSpecialCurrencyInfo.
      • Add explicit return type to getFiatSymbol.

Written by Cursor Bugbot for commit fd0dd61. This will update automatically on new commits. Configure here.


Old wallets can take a long time to load. Showing more precision will show that the synchronizer is still working
@peachbits peachbits force-pushed the matthew/high-precision-arrr-sync branch from bf48730 to fd0dd61 Compare November 12, 2025 22:30
@peachbits peachbits enabled auto-merge November 12, 2025 22:30

const { displayName, pluginId } = wallet.currencyInfo
const { highPrecisionSyncRatioDisplay = false } =
SPECIAL_CURRENCY_INFO[pluginId]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Robust Destructuring for Optional Data

Destructuring SPECIAL_CURRENCY_INFO[pluginId] directly will throw a runtime error if the pluginId doesn't exist in the record. The code should use getSpecialCurrencyInfo(pluginId) or add a nullish coalescing operator (?? {}) to safely handle missing entries, similar to how other parts of the codebase handle this case.

Fix in Cursor Fix in Web

@peachbits peachbits merged commit c5b78d8 into develop Nov 12, 2025
3 checks passed
@peachbits peachbits deleted the matthew/high-precision-arrr-sync branch November 12, 2025 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants