From: Zhiting Lin Date: Thu, 15 Nov 2018 02:55:51 +0000 (+0800) Subject: update balances after the rescan X-Git-Url: http://git.sourceforge.jp/view?a=commitdiff_plain;h=1db82d9a040296eda18c773c12bca1da70129d3b;p=bytom%2Fbytom-electron.git update balances after the rescan --- diff --git a/src/features/balances/actions.js b/src/features/balances/actions.js index fce2f40..56c6a99 100644 --- a/src/features/balances/actions.js +++ b/src/features/balances/actions.js @@ -1,5 +1,6 @@ import { baseListActions } from 'features/shared/actions' import { chainClient } from 'utility/environment' +import {push} from 'react-router-redux' const updateInfo = (param) => ({type: 'UPDATE_WALLET_INFO', param}) @@ -28,6 +29,7 @@ const walletInfo = () => { } else { if (info.data.bestBlockHeight === info.data.walletHeight) { dispatch({type: 'STOP_RESCAN'}) + dispatch( push('/balances') ) }else{ dispatch(updateInfo(info.data)) } diff --git a/src/features/balances/components/List.jsx b/src/features/balances/components/List.jsx index 68d0093..24b4481 100644 --- a/src/features/balances/components/List.jsx +++ b/src/features/balances/components/List.jsx @@ -10,32 +10,8 @@ const type = 'balance' class List extends React.Component { rescanWallet(){ - // this.props.rescan() - - // debugger - // if (this.props.rescanning) { - // window.setTimeout(this.props.info(), 1000) - // } - - // let progressInstance = () - // let now = 0 - // - // this.setStat = () => { - // if (this.props.rescanning) { - // this.props.info() - // now = this.props.rescanProgress.bestBlockHeight? this.props.rescanProgress.walletHeight/ this.props.rescanProgress.bestBlockHeight :0 - // setTimeout(this.setStat, 1000) - // }else{ - // this.props.info() - // console.log('successfully rescan') - // } - // } - - // this.setStat() - this.props.showModal( )