File tree Expand file tree Collapse file tree 1 file changed +5
-17
lines changed Expand file tree Collapse file tree 1 file changed +5
-17
lines changed Original file line number Diff line number Diff line change @@ -127,12 +127,7 @@ import { selectBasicFunctionalityEnabled } from '../../selectors/settings';
127127import { selectSwapsChainFeatureFlags } from '../../reducers/swaps' ;
128128import { ClientId } from '@metamask/smart-transactions-controller/dist/types' ;
129129import { zeroAddress } from 'ethereumjs-util' ;
130- import {
131- ApprovalType ,
132- ChainId ,
133- handleFetch ,
134- convertHexToDecimal ,
135- } from '@metamask/controller-utils' ;
130+ import { ApprovalType , ChainId , handleFetch } from '@metamask/controller-utils' ;
136131import { ExtendedControllerMessenger } from '../ExtendedControllerMessenger' ;
137132import DomainProxyMap from '../../lib/DomainProxyMap/DomainProxyMap' ;
138133import {
@@ -1694,20 +1689,13 @@ export class Engine {
16941689 selectedInternalAccountFormattedAddress
16951690 ]
16961691 ) {
1697- // TODO - Non EVM accounts like BTC do not use hex formatted balances. We will need to modify this to use CAIP-2 identifiers in the future.
1698- const balanceBN = hexToBN (
1692+ const balanceHex =
16991693 accountsByChainId [ toHexadecimal ( chainId ) ] [
17001694 selectedInternalAccountFormattedAddress
1701- ] . balance ,
1702- ) ;
1695+ ] . balance ;
17031696
1704- totalNativeTokenBalance = renderFromWei (
1705- convertHexToDecimal (
1706- accountsByChainId [ toHexadecimal ( chainId ) ] [
1707- selectedInternalAccountFormattedAddress
1708- ] . balance ,
1709- ) ,
1710- ) ;
1697+ const balanceBN = hexToBN ( balanceHex ) ;
1698+ totalNativeTokenBalance = renderFromWei ( balanceHex ) ;
17111699
17121700 // TODO - Non EVM accounts like BTC do not use hex formatted balances. We will need to modify this to use CAIP-2 identifiers in the future.
17131701 const stakedBalanceBN = hexToBN (
You can’t perform that action at this time.
0 commit comments