1
1
import React from 'react' ;
2
2
import { useSelector } from 'react-redux' ;
3
- import { isEqual } from 'lodash' ;
4
3
import {
5
4
///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
6
5
getMultichainIsMainnet ,
@@ -10,7 +9,6 @@ import {
10
9
} from '../../../selectors/multichain' ;
11
10
///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
12
11
import { getIsBitcoinBuyable } from '../../../ducks/ramps' ;
13
- import { getSelectedInternalAccount } from '../../../selectors' ;
14
12
import { useMultichainSelector } from '../../../hooks/useMultichainSelector' ;
15
13
///: END:ONLY_INCLUDE_IF
16
14
import { getSelectedInternalAccount } from '../../../selectors' ;
@@ -23,18 +21,15 @@ type BtcOverviewProps = {
23
21
const BtcOverview = ( { className } : BtcOverviewProps ) => {
24
22
const { chainId } = useSelector ( getMultichainProviderConfig ) ;
25
23
const balance = useSelector ( getMultichainSelectedAccountCachedBalance ) ;
24
+ const account = useSelector ( getSelectedInternalAccount ) ;
26
25
///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
27
- const selectedAccount = useSelector ( getSelectedInternalAccount ) ;
28
26
const isBtcMainnetAccount = useMultichainSelector (
29
27
getMultichainIsMainnet ,
30
- selectedAccount ,
28
+ account ,
31
29
) ;
32
30
const isBtcBuyable = useSelector ( getIsBitcoinBuyable ) ;
33
31
///: END:ONLY_INCLUDE_IF
34
32
35
- // FIXME: Use `isEqual` to avoid potential re-renders
36
- const account = useSelector ( getSelectedInternalAccount , isEqual ) ;
37
-
38
33
return (
39
34
< CoinOverview
40
35
account = { account }
0 commit comments