Skip to content

Commit

Permalink
fix: mark suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
jeeanribeiro committed Jul 3, 2024
1 parent 5c9d091 commit 781b335
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ export function getDecimalSeparator(currency: string | undefined = undefined): s
currency = get(activeProfile)?.settings?.marketCurrency
}

const isCurrencySupportedByIntl = currency?.length <= 3
return (
Intl.NumberFormat(appLanguage, {
style: 'currency',
currency: currency.length > 3 ? 'USD' : currency,
currency: isCurrencySupportedByIntl ? currency : 'USD',
})
.formatToParts(1.1)
.find((part) => part.type === 'decimal')?.value ?? '.'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { CryptoCurrency, FiatCurrency } from '../enums'
import { MarketCurrency } from './market-currency.type'

export type MarketPrices = { [key in FiatCurrency | CryptoCurrency]?: number }
export type MarketPrices = { [key in MarketCurrency]?: number }
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export const ALPHA_PROFILE_MIGRATION_MAP: ProfileMigrationMap = {
20: alphaProfileMigration20To21,
// ^^^ release 1.0.4 ^^^
21: alphaProfileMigration21To22,
22: alphaProfileMigration22To23,
// ^^^ release 1.0.8 ^^^
22: alphaProfileMigration22To23,
// ^^^ release 1.1.2 ^^^
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const PROD_PROFILE_MIGRATION_MAP: ProfileMigrationMap = {
10: prodProfileMigration10To11,
// ^^^ release 1.0.4 ^^^
11: prodProfileMigration11To12,
12: prodProfileMigration12To13,
// ^^^ release 1.0.8 ^^^
12: prodProfileMigration12To13,
// ^^^ release 1.1.2 ^^^
}

0 comments on commit 781b335

Please sign in to comment.