1- import React , { useState , useEffect , useMemo } from 'react'
1+ import React , { useState , useMemo } from 'react'
22import { RouteComponentProps } from 'react-router-dom'
33import { useTranslation } from 'react-i18next'
44import {
@@ -18,7 +18,6 @@ import { ckbCore } from 'services/chain'
1818import { StateWithDispatch } from 'states/stateProvider/reducer'
1919
2020import { useLocalDescription } from 'utils/hooks'
21- import { Routes } from 'utils/const'
2221import { localNumberFormatter , shannonToCKBFormatter } from 'utils/formatters'
2322import { onRenderRow } from 'utils/fabricUIRender'
2423
@@ -28,22 +27,13 @@ const Addresses = ({
2827 } ,
2928 wallet : { addresses = [ ] , id : walletID } ,
3029 chain : { networkID } ,
31- settings : {
32- general : { showAddressBook = false } ,
33- networks = [ ] ,
34- } ,
35- history,
30+ settings : { networks = [ ] } ,
3631 dispatch,
3732} : React . PropsWithoutRef < StateWithDispatch & RouteComponentProps > ) => {
3833 const isMainnet =
3934 ( networks . find ( n => n . id === networkID ) || { } ) . chain === ( process . env . REACT_APP_MAINNET_TAG || 'ckb' )
4035 const [ showMainnetAddress , setShowMainnetAddress ] = useState ( false )
4136 const [ t ] = useTranslation ( )
42- useEffect ( ( ) => {
43- if ( ! showAddressBook ) {
44- history . push ( Routes . Overview )
45- }
46- } , [ showAddressBook , history ] )
4737
4838 const {
4939 localDescription,
0 commit comments