Skip to content

Comments

fix: currency filter when over thousands or below a certain value#700

Merged
kvhnuke merged 6 commits intodevop/release-v2-8-0from
fix/currency-filter
Jun 2, 2025
Merged

fix: currency filter when over thousands or below a certain value#700
kvhnuke merged 6 commits intodevop/release-v2-8-0from
fix/currency-filter

Conversation

@gamalielhere
Copy link
Contributor

@gamalielhere gamalielhere commented May 23, 2025

Summary by CodeRabbit

  • Refactor
    • Improved currency parsing and formatting for clearer and more consistent display of monetary values across the app.
    • Updated various UI components to use the new currency formatting method, enhancing uniformity in how fiat values are presented to users.
    • Simplified display of token balances and prices by removing redundant formatting, resulting in more straightforward and consistent fiat value presentations.

@coderabbitai
Copy link

coderabbitai bot commented May 23, 2025

Walkthrough

The parseCurrency function in the filters utility was refactored to simplify input cleaning, exchange rate application, and formatting logic. Multiple components and network classes removed the use of the formatFiatValue function, replacing it with direct string representations or the parseCurrency filter for fiat value formatting. Minor UI template changes reflect this updated formatting approach. No changes were made to function signatures or core logic beyond formatting.

Changes

File(s) Change Summary
packages/extension/src/ui/action/utils/filters.ts Refactored parseCurrency to simplify input cleaning, exchange rate application, and formatting.
packages/extension/src/providers/bitcoin/types/bitcoin-network.ts Removed formatFiatValue usage; replaced formatted fiat strings with raw string representations.
packages/extension/src/providers/bitcoin/ui/send-transaction/components/send-alert.vue Replaced fiat value formatting from formatFiatValue to parseCurrency, removed dollar sign prefix.
packages/extension/src/providers/common/ui/send-transaction/send-alert.vue Replaced fiat value formatting from formatFiatValue to parseCurrency, removed dollar sign prefix.
packages/extension/src/providers/common/ui/verify-transaction/verify-transaction-amount.vue Replaced formatFiatValue with parseCurrency for token USD value display.
packages/extension/src/providers/ethereum/libs/assets-handlers/assetinfo-mew.ts Removed formatFiatValue usage; assigned raw string values for fiat balances and prices.
packages/extension/src/providers/ethereum/networks/skale/skale-base.ts Removed formatFiatValue usage; assigned raw string values for fiat balances and prices.
packages/extension/src/providers/ethereum/types/evm-network.ts Removed formatFiatValue usage; replaced formatted fiat strings with raw string representations.
packages/extension/src/providers/ethereum/ui/eth-verify-transaction.vue Replaced fiat value formatting from formatFiatValue to parseCurrency.
packages/extension/src/providers/kadena/types/kadena-network.ts Removed formatFiatValue usage; replaced formatted fiat strings with raw string representations.
packages/extension/src/providers/kadena/ui/send-transaction/components/send-token-item.vue Replaced fiat value formatting from formatFiatValue to parseCurrency.
packages/extension/src/providers/polkadot/types/substrate-network.ts Removed formatFiatValue usage; replaced formatted fiat strings with raw string representations.
packages/extension/src/providers/polkadot/ui/send-transaction/components/send-token-item.vue Replaced fiat value formatting from formatFiatValue to parseCurrency.
packages/extension/src/providers/solana/types/sol-network.ts Removed formatFiatValue usage; replaced formatted fiat strings with raw string representations.
packages/extension/src/providers/solana/ui/sol-verify-transaction.vue Replaced fiat value formatting from formatFiatValue to parseCurrency, removed manual dollar sign.
packages/extension/src/ui/action/composables/account-info.ts Removed formatFiatValue usage; assigned raw fiat values directly from market data.
packages/extension/src/ui/action/views/network-assets/components/network-assets-item.vue Changed token USD balance display from formatted field to raw balance string.
packages/extension/src/ui/action/views/send-process/components/send-process-amount.vue Replaced fiat value formatting from formatFiatValue to parseCurrency.
packages/extension/src/ui/action/views/settings/components/settings-select.vue Changed filter logic to search by uppercase fiat_currency property.
packages/extension/src/ui/action/views/swap/views/swap-best-offer/components/best-offer-error.vue Replaced fiat value formatting from formatFiatValue to parseCurrency in error message display.
packages/extension/src/ui/action/views/swap/views/swap-best-offer/components/best-offer-block/index.vue Replaced fiat value formatting from formatFiatValue to parseCurrency in template display.
packages/extension/src/providers/bitcoin/ui/btc-verify-transaction.vue Replaced fiat value formatting from formatFiatValue to parseCurrency; changed interpolation syntax.

Sequence Diagram(s)

sequenceDiagram
    participant Caller
    participant FiltersUtil

    Caller->>FiltersUtil: parseCurrency(value)
    FiltersUtil->>FiltersUtil: Clean input (remove commas, '<')
    FiltersUtil->>FiltersUtil: Retrieve currency, locale, exchange rate
    FiltersUtil->>FiltersUtil: Convert to BigNumber, check NaN/zero
    FiltersUtil->>FiltersUtil: Multiply by exchange rate
    FiltersUtil->>FiltersUtil: Format using Intl.NumberFormat
    FiltersUtil-->>Caller: Return formatted currency string
Loading

Possibly related PRs

Suggested reviewers

  • NickKelly1

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1f81576 and c10dfde.

📒 Files selected for processing (1)
  • packages/extension/src/providers/bitcoin/ui/btc-verify-transaction.vue (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/extension/src/providers/bitcoin/ui/btc-verify-transaction.vue
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: buildAll
  • GitHub Check: test
  • GitHub Check: test

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link

github-actions bot commented May 23, 2025

💼 Build Files
chrome: enkrypt-chrome-c10dfde8.zip
firefox: enkrypt-firefox-c10dfde8.zip

💉 Virus total analysis
chrome: c10dfde8
firefox: c10dfde8

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 97bd787 and 39638a5.

📒 Files selected for processing (1)
  • packages/extension/src/ui/action/utils/filters.ts (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/extension/src/ui/action/utils/filters.ts (2)
packages/extension/src/ui/action/views/settings/store.ts (1)
  • useCurrencyStore (12-41)
packages/extension/src/ui/action/utils/currencyConfig.ts (1)
  • LANG_INFO (173-173)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: buildAll
  • GitHub Check: test
  • GitHub Check: test
🔇 Additional comments (3)
packages/extension/src/ui/action/utils/filters.ts (3)

24-24: Good input sanitization for currency parsing.

The regex /[,<]/g effectively handles both thousands separators (commas) and small value indicators (less-than signs), which aligns with the PR objective of fixing currency filters for values over thousands or below certain values.


30-31: Robust BigNumber handling with proper exchange rate conversion.

The implementation correctly:

  • Handles NaN and zero values by returning 0
  • Applies exchange rate conversion using BigNumber for precision
  • Converts to number for formatting

33-36: Excellent use of internationalized formatting.

Using Intl.NumberFormat with locale-specific currency formatting is the right approach for handling different currency display formats across locales.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 39638a5 and 21819c6.

📒 Files selected for processing (21)
  • packages/extension/src/providers/bitcoin/types/bitcoin-network.ts (1 hunks)
  • packages/extension/src/providers/bitcoin/ui/send-transaction/components/send-alert.vue (1 hunks)
  • packages/extension/src/providers/common/ui/send-transaction/send-alert.vue (1 hunks)
  • packages/extension/src/providers/common/ui/verify-transaction/verify-transaction-amount.vue (1 hunks)
  • packages/extension/src/providers/ethereum/libs/assets-handlers/assetinfo-mew.ts (4 hunks)
  • packages/extension/src/providers/ethereum/networks/skale/skale-base.ts (1 hunks)
  • packages/extension/src/providers/ethereum/types/evm-network.ts (2 hunks)
  • packages/extension/src/providers/ethereum/ui/eth-verify-transaction.vue (1 hunks)
  • packages/extension/src/providers/kadena/types/kadena-network.ts (2 hunks)
  • packages/extension/src/providers/kadena/ui/send-transaction/components/send-token-item.vue (1 hunks)
  • packages/extension/src/providers/polkadot/types/substrate-network.ts (1 hunks)
  • packages/extension/src/providers/polkadot/ui/send-transaction/components/send-token-item.vue (1 hunks)
  • packages/extension/src/providers/solana/types/sol-network.ts (1 hunks)
  • packages/extension/src/providers/solana/ui/sol-verify-transaction.vue (1 hunks)
  • packages/extension/src/ui/action/composables/account-info.ts (2 hunks)
  • packages/extension/src/ui/action/utils/filters.ts (2 hunks)
  • packages/extension/src/ui/action/views/network-assets/components/network-assets-item.vue (1 hunks)
  • packages/extension/src/ui/action/views/send-process/components/send-process-amount.vue (1 hunks)
  • packages/extension/src/ui/action/views/settings/components/settings-select.vue (1 hunks)
  • packages/extension/src/ui/action/views/swap/views/swap-best-offer/components/swap-best-offer-block/components/best-offer-error.vue (1 hunks)
  • packages/extension/src/ui/action/views/swap/views/swap-best-offer/components/swap-best-offer-block/index.vue (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/extension/src/ui/action/views/swap/views/swap-best-offer/components/swap-best-offer-block/components/best-offer-error.vue
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/extension/src/ui/action/utils/filters.ts
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/extension/src/providers/ethereum/libs/assets-handlers/assetinfo-mew.ts (2)
packages/swap/src/configs.ts (1)
  • NATIVE_TOKEN_ADDRESS (123-123)
packages/extension/src/libs/market-data/types.ts (1)
  • CoinGeckoTokenMarket (23-37)
🪛 Biome (1.9.4)
packages/extension/src/providers/ethereum/libs/assets-handlers/assetinfo-mew.ts

[error] 287-287: Avoid the use of spread (...) syntax on accumulators.

Spread syntax should be avoided on accumulators (like those in .reduce) because it causes a time complexity of O(n^2).
Consider methods such as .splice or .push instead.

(lint/performance/noAccumulatingSpread)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: buildAll
  • GitHub Check: test
  • GitHub Check: test
🔇 Additional comments (19)
packages/extension/src/ui/action/views/send-process/components/send-process-amount.vue (1)

11-11: Verify that parseCurrency handles all edge cases correctly.

The change from formatFiatValue(token.valueUSD).value to $filters.parseCurrency(token.valueUSD) is consistent with the broader refactor to standardize currency formatting. However, ensure that the parseCurrency filter handles all the same edge cases (null values, very large numbers, very small numbers) that formatFiatValue previously handled.

packages/extension/src/ui/action/views/network-assets/components/network-assets-item.vue (1)

48-48: Currency formatting refactor looks good.

The change from token.balanceUSDf to $filters.parseCurrency(token.balanceUSD) is consistent with the broader refactor to use the parseCurrency filter instead of pre-formatted fields. This should provide more consistent currency formatting across the application.

packages/extension/src/providers/common/ui/verify-transaction/verify-transaction-amount.vue (1)

11-11: LGTM! Consistent currency formatting refactor.

The change to use $filters.parseCurrency(token.valueUSD) is consistent with the broader refactor across the extension and should provide standardized currency formatting.

packages/extension/src/ui/action/views/settings/components/settings-select.vue (1)

76-76:

Details

✅ Verification successful

Verify the updated filtering logic is correct.

The change from filtering on item directly to item.fiat_currency suggests the data structure has changed. Ensure that the list items now have a fiat_currency property and that this filtering logic aligns with the expected behavior.


🏁 Script executed:

#!/bin/bash
# Description: Verify the structure of list items passed to settings-select component
# Expected: Items should have fiat_currency property

# Search for usages of settings-select component to understand the data structure
rg -A 10 -B 5 "settings-select" --type vue

Length of output: 70


🏁 Script executed:

#!/bin/bash
set -e

# Locate the settings-select.vue file
FILE_PATH=$(find . -type f -iname 'settings-select.vue' | head -n 1)
echo "Found file: $FILE_PATH"

# Print component props and filtering logic around line 76
echo "---- Lines 1-40 (props) ----"
sed -n '1,40p' "$FILE_PATH"

echo "---- Lines 50-100 (including filter at line 76) ----"
sed -n '50,100p' "$FILE_PATH"

Length of output: 2865


🏁 Script executed:

#!/bin/bash
set -e

echo "Searching for <settings-select> usages in templates:"
rg -n "<settings-select" -A3 -B3 .

echo
echo "Searching for definitions or assignments of 'fiat_currency':"
rg -n "fiat_currency" -C2 .

Length of output: 6174


Currency filtering verified

The list prop items conform to the Currency interface (which defines a fiat_currency: string in store.ts). The searchedList filter in settings-select.vue and the SettingSelectOption bindings consistently use item.fiat_currency, matching the intended behavior. No further changes required.

• packages/extension/src/ui/action/views/settings/store.ts – type Currency includes fiat_currency: string
• packages/extension/src/ui/action/views/settings/components/settings-select.vue – searchedList uses item.fiat_currency.includes(...)
• packages/extension/src/ui/action/views/settings/components/setting-select-option.vue – :title="item.fiat_currency" and flag/icon bindings

packages/extension/src/providers/kadena/ui/send-transaction/components/send-token-item.vue (1)

20-21: LGTM! Currency formatting update aligns with the broader refactor.

The replacement of formatFiatValue with parseCurrency is consistent with the PR objective to fix currency filtering for large values and follows the pattern established across other provider components.

packages/extension/src/providers/common/ui/send-transaction/send-alert.vue (1)

8-8: Currency formatting improvement for insufficient funds alert.

Good change replacing formatFiatValue with parseCurrency. The removal of the manual dollar sign prefix suggests that parseCurrency handles currency symbols internally, which is cleaner and more consistent.

packages/extension/src/providers/ethereum/ui/eth-verify-transaction.vue (1)

64-64: Currency formatting update maintains existing conditional logic.

The replacement of formatFiatValue with parseCurrency is correctly implemented while preserving the conditional display logic for handling the '~' placeholder value.

packages/extension/src/providers/solana/ui/sol-verify-transaction.vue (1)

72-72:

Details

✅ Verification successful

Verify the necessity of parseFloat conversion.

The change correctly updates to parseCurrency, but the parseFloat(item.USDval) conversion differs from other files that pass values directly. Please verify that this conversion is necessary for the item.USDval data type.


🏁 Script executed:

#!/bin/bash
# Description: Check if other components also use parseFloat with parseCurrency filter
# Expected: Find patterns of parseFloat usage with parseCurrency to confirm consistency

rg -A 2 -B 2 "parseCurrency.*parseFloat|parseFloat.*parseCurrency"

Length of output: 1251


Confirm parseFloat usage for USDval
It looks like all instances of parseCurrency in the repo first normalize their inputs with parseFloat (for example, in transaction-fee-item.vue). In sol-verify-transaction.vue, item.USDval comes through as a string, so wrapping it in parseFloat(...) is consistent with existing patterns.

No change is required here. Keeping the parseFloat(item.USDval) conversion ensures the filter always receives a numeric value.

packages/extension/src/providers/solana/types/sol-network.ts (1)

132-133: LGTM! Consistent with balanceUSDf change.

The valuef field change maintains consistency with the balanceUSDf modification by using raw string representation instead of pre-formatted values.

packages/extension/src/providers/bitcoin/ui/send-transaction/components/send-alert.vue (1)

10-10: LGTM! Consistent with currency formatting refactor.

The change from formatFiatValue to parseCurrency simplifies the currency formatting and should automatically handle the currency symbol placement. The priceDifference computed value (BigNumber string) is compatible with the new filter.

packages/extension/src/providers/kadena/types/kadena-network.ts (2)

118-118: LGTM! Consistent with network provider refactor.

The change to use usdBalance.toString() for balanceUSDf is consistent with the same modification in other network providers (like Solana). This moves formatting responsibility to the UI layer where parseCurrency filter will handle it.


123-123: LGTM! Maintains consistency with balanceUSDf change.

The valuef field change follows the same pattern as balanceUSDf, using raw string representation for currency values that will be formatted by the UI layer.

packages/extension/src/providers/polkadot/ui/send-transaction/components/send-token-item.vue (1)

20-21: LGTM! Proper migration to parseCurrency filter.

The changes correctly migrate from formatFiatValue to parseCurrency filter for both token balance and token price displays. The data types (tokenBalance as BigNumber string and tokenPrice as number) are compatible with the new filter.

packages/extension/src/ui/action/views/swap/views/swap-best-offer/components/swap-best-offer-block/index.vue (1)

19-19: LGTM! Proper migration to parseCurrency filter.

The change from formatFiatValue(toTokenPrice).value to parseCurrency(toTokenPrice) correctly implements the new currency formatting approach and should address the currency filter issues mentioned in the PR title.

packages/extension/src/ui/action/composables/account-info.ts (1)

34-38:

Details

✅ Verification successful

Simplified fiat value assignment - verify UI formatting.

The removal of formatFiatValue and direct string conversion simplifies the logic. However, ensure that UI components consuming fiatAmount.value properly format the currency using the parseCurrency filter, as raw values from marketData.getTokenValue may not be user-friendly for display.


🏁 Script executed:

#!/bin/bash
# Description: Verify that components using fiatAmount from account-info composable properly format the value

# Search for usage of fiatAmount in Vue templates
rg -A 3 -B 3 "fiatAmount" --type vue

# Look for account-info composable usage
rg -A 5 -B 2 "account-info" --include="*.vue" --include="*.ts"

Length of output: 569


I’ll re-run searches with corrected ripgrep flags to locate any uses of fiatAmount and ensure currency formatting is applied.


🏁 Script executed:

#!/bin/bash
# Search for usage of fiatAmount in .vue and .ts files
rg "fiatAmount" -n --glob '*.vue' --glob '*.ts'

# Search for account-info composable import/usage
rg "useAccountInfo" -n --glob '*.vue' --glob '*.ts'
rg "account-info" -n --glob '*.vue' --glob '*.ts'

# Check for template interpolation of fiatAmount in Vue templates
rg "\{\{\s*fiatAmount" -n --glob '*.vue'

# Verify parseCurrency filter usage where fiatAmount might be passed through formatting
rg "parseCurrency" -n --glob '*.vue' --glob '*.ts'

Length of output: 11970


I’ll inspect the network-assets view to see how fiatAmount is rendered and whether it’s formatted downstream.


🏁 Script executed:

#!/bin/bash
# Print imports and template usage around fiat-amount in network-assets index.vue
sed -n '1,80p' packages/extension/src/ui/action/views/network-assets/index.vue

Length of output: 3088


Formatting is applied in downstream components – no changes needed.

The raw fiatAmount.value string is passed into components like NetworkActivityTotal and NetworkActivityTransaction, both of which wrap it in {{ $filters.parseCurrency(fiatAmount) }}. This ensures proper currency formatting in the UI.

No further action required.

packages/extension/src/providers/bitcoin/types/bitcoin-network.ts (1)

133-138:

Details

❓ Verification inconclusive

Ensure proper currency formatting for Bitcoin assets.

Similar to other network providers, the removal of formatFiatValue and direct assignment of raw string values could lead to inconsistent currency formatting. Raw BigNumber.toString() and current_price?.toString() may not provide user-friendly formatting for large numbers or small decimals.

Verify that UI components consuming Bitcoin asset data properly format balanceUSDf and valuef using the parseCurrency filter.


🏁 Script executed:

#!/bin/bash
# Description: Verify consistent currency formatting across all network providers

# Search for similar patterns in other network provider files
rg -A 2 -B 2 "balanceUSDf.*toString|valuef.*toString" --type ts

# Check if all network providers have been updated consistently
fd "network.ts$" --exec grep -l "balanceUSDf\|valuef" {} \;

Length of output: 6498


Confirm fiat formatting consistency for Bitcoin assets

Across all network providers (Bitcoin, Solana, Ethereum EVM, Polkadot, Kadena), the balanceUSDf and valuef fields now receive raw strings via .toString() rather than using formatFiatValue. Raw BigNumber.toString() and current_price?.toString() may omit separators or inconsistent decimal places.

Please verify that your UI layer applies the parseCurrency filter (or equivalent) when rendering these fiat values to ensure a consistent, user-friendly display.

Files to check:

  • packages/extension/src/providers/bitcoin/types/bitcoin-network.ts (lines 133–138)
  • packages/extension/src/providers/solana/types/sol-network.ts
  • packages/extension/src/providers/ethereum/types/evm-network.ts
  • packages/extension/src/providers/polkadot/types/substrate-network.ts
  • packages/extension/src/providers/kadena/types/kadena-network.ts
packages/extension/src/providers/polkadot/types/substrate-network.ts (1)

162-162: LGTM: Clean architectural separation of concerns.

The removal of formatFiatValue and use of raw string values is a good architectural improvement that separates data processing from presentation formatting. The BigNumber.toString() call is safe and the UI layer will handle formatting via parseCurrency filter.

packages/extension/src/providers/ethereum/types/evm-network.ts (1)

153-156: LGTM: Consistent implementation with proper null safety.

The changes consistently remove formatFiatValue usage and maintain proper null safety with optional chaining and nullish coalescing operators. The BigNumber.toString() calls are safe and the approach aligns with the architectural refactor.

Also applies to: 270-273

packages/extension/src/providers/ethereum/libs/assets-handlers/assetinfo-mew.ts (1)

340-340: LGTM: Consistent formatting refactor implementation.

The removal of formatFiatValue follows the same pattern as other network providers and maintains type safety with proper string conversion.

Also applies to: 345-345, 380-380, 388-388

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 21819c6 and cb69550.

📒 Files selected for processing (2)
  • packages/extension/src/providers/bitcoin/ui/btc-verify-transaction.vue (1 hunks)
  • packages/extension/src/ui/action/views/settings/components/settings-select.vue (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/extension/src/ui/action/views/settings/components/settings-select.vue

@kvhnuke kvhnuke changed the base branch from develop to devop/release-v2-8-0 June 2, 2025 17:44
@kvhnuke kvhnuke merged commit 7dbe5e6 into devop/release-v2-8-0 Jun 2, 2025
4 of 5 checks passed
@kvhnuke kvhnuke deleted the fix/currency-filter branch June 2, 2025 17:45
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