File tree Expand file tree Collapse file tree
packages/neuron-wallet/src/startup/sync-block-task Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ import { distinctUntilChanged } from 'rxjs/operators'
1414import LockUtils from 'models/lock-utils'
1515import DaoUtils from 'models/dao-utils'
1616import NetworkSwitchSubject from 'models/subjects/network-switch-subject'
17+ import { SyncedBlockNumberSubject } from 'models/subjects/node'
18+ import BlockNumber from 'services/sync/block-number'
1719
1820export { genesisBlockHash }
1921
@@ -36,6 +38,8 @@ const networkChange = async (network: NetworkWithID) => {
3638 DaoUtils . cleanInfo ( )
3739 const info = await InitDatabase . getInstance ( ) . init ( network )
3840
41+ const blockNumber = await ( new BlockNumber ( ) ) . getCurrent ( )
42+ SyncedBlockNumberSubject . next ( blockNumber . toString ( ) )
3943 DataUpdateSubject . next ( {
4044 dataType : 'transaction' ,
4145 actionType : 'update' ,
You can’t perform that action at this time.
0 commit comments