diff --git a/packages/suite/src/views/wallet/send/components/Outputs/components/Amount/components/SendMaxSwitch.tsx b/packages/suite/src/views/wallet/send/components/Outputs/components/Amount/components/SendMaxSwitch.tsx index ee6dc4fd6eb..cddd5a2ea19 100644 --- a/packages/suite/src/views/wallet/send/components/Outputs/components/Amount/components/SendMaxSwitch.tsx +++ b/packages/suite/src/views/wallet/send/components/Outputs/components/Amount/components/SendMaxSwitch.tsx @@ -9,7 +9,7 @@ const StyledSwitch = styled(Switch)<{ $hideOnSmallScreens?: boolean; }>` ${({ $hideOnLargeScreens }) => - $hideOnLargeScreens && + $hideOnLargeScreens === true && css` ${breakpointMediaQueries.lg} { display: none; diff --git a/suite-common/wallet-core/src/fiat-rates/fiatRatesReducer.ts b/suite-common/wallet-core/src/fiat-rates/fiatRatesReducer.ts index dfcac8f18d8..6dfc30aa004 100644 --- a/suite-common/wallet-core/src/fiat-rates/fiatRatesReducer.ts +++ b/suite-common/wallet-core/src/fiat-rates/fiatRatesReducer.ts @@ -1,6 +1,6 @@ import { createReducerWithExtraDeps } from '@suite-common/redux-utils'; import { Timestamp } from '@suite-common/wallet-types'; -import { getFiatRateKeyFromTicker } from '@suite-common/wallet-utils'; +import { getFiatRateKeyFromTicker, isTestnet } from '@suite-common/wallet-utils'; import { updateFiatRatesThunk } from './fiatRatesThunks'; import { FiatRatesState } from './fiatRatesTypes'; @@ -19,6 +19,10 @@ export const prepareFiatRatesReducer = createReducerWithExtraDeps( const fiatRateKey = getFiatRateKeyFromTicker(ticker, localCurrency); let currentRate = state[rateType]?.[fiatRateKey]; + if (isTestnet(ticker.symbol)) { + return; + } + if (currentRate) { currentRate = { ...currentRate, @@ -63,6 +67,10 @@ export const prepareFiatRatesReducer = createReducerWithExtraDeps( const fiatRateKey = getFiatRateKeyFromTicker(ticker, localCurrency); const currentRate = state[rateType]?.[fiatRateKey]; + if (isTestnet(ticker.symbol)) { + return; + } + // To prevent race condition someone will remove rate from state while fetching for example (during currency change etc.) if (!currentRate) { return; diff --git a/suite-common/wallet-core/src/fiat-rates/fiatRatesThunks.ts b/suite-common/wallet-core/src/fiat-rates/fiatRatesThunks.ts index 4be08cbf311..ad721f2bb52 100644 --- a/suite-common/wallet-core/src/fiat-rates/fiatRatesThunks.ts +++ b/suite-common/wallet-core/src/fiat-rates/fiatRatesThunks.ts @@ -80,7 +80,9 @@ export const updateFiatRatesThunk = createThunk( { ticker, localCurrency, rateType, forceFetchToken }: UpdateCurrentFiatRatesThunkPayload, { getState }, ) => { - if (isTestnet(ticker.symbol)) return; + if (isTestnet(ticker.symbol)) { + throw new Error('Testnet'); + } const hasCoinDefinitions = getNetworkFeatures(ticker.symbol).includes('coin-definitions'); if (ticker.tokenAddress && hasCoinDefinitions && !forceFetchToken) {