@@ -28,6 +28,7 @@ import { selectFiatCurrencyCode, SettingsSliceRootState } from '@suite-native/se
28
28
import { BigNumber } from '@trezor/utils' ;
29
29
import { Account , RatesByKey } from '@suite-common/wallet-types' ;
30
30
import { FiatCurrencyCode } from '@suite-common/suite-config' ;
31
+ import { doesCoinSupportStaking } from '@suite-native/staking' ;
31
32
32
33
import { isFirmwareVersionSupported } from './utils' ;
33
34
@@ -74,8 +75,8 @@ export const selectDeviceError = (
74
75
return device ?. error ;
75
76
} ;
76
77
77
- // FIXME: this function can be removed and substitued with @suite -common/wallet-utils/getTotalFiatBalance when Solana supports staking on mobile.
78
- const getTotalFiatBalance = ( {
78
+ // FIXME: this function can be removed and substituted with @suite -common/wallet-utils/getTotalFiatBalance when Solana supports staking on mobile.
79
+ const getTotalFiatBalanceNative = ( {
79
80
deviceAccounts,
80
81
localCurrency,
81
82
rates,
@@ -91,7 +92,7 @@ const getTotalFiatBalance = ({
91
92
account : a ,
92
93
localCurrency,
93
94
rates,
94
- shouldIncludeStaking : a . networkType !== 'solana' ,
95
+ shouldIncludeStaking : doesCoinSupportStaking ( a . symbol ) ,
95
96
} ) ?? '0' ;
96
97
instanceBalance = instanceBalance . plus ( accountFiatBalance ) ;
97
98
} ) ;
@@ -102,13 +103,13 @@ const getTotalFiatBalance = ({
102
103
export const selectSelectedDeviceTotalFiatBalance = createMemoizedSelector (
103
104
[ selectDeviceAccounts , selectCurrentFiatRates , selectFiatCurrencyCode ] ,
104
105
( deviceAccounts , rates , localCurrency ) =>
105
- getTotalFiatBalance ( { deviceAccounts, localCurrency, rates } ) ,
106
+ getTotalFiatBalanceNative ( { deviceAccounts, localCurrency, rates } ) ,
106
107
) ;
107
108
108
109
export const selectDeviceTotalFiatBalanceByDeviceState = createMemoizedSelector (
109
110
[ selectAccountsByDeviceState , selectCurrentFiatRates , selectFiatCurrencyCode ] ,
110
111
( deviceAccounts , rates , localCurrency ) =>
111
- getTotalFiatBalance ( { deviceAccounts, localCurrency, rates } ) ,
112
+ getTotalFiatBalanceNative ( { deviceAccounts, localCurrency, rates } ) ,
112
113
) ;
113
114
114
115
// Unique symbols for all accounts that are on view only devices (excluding portfolio tracker)
0 commit comments