Skip to content

Commit

Permalink
fix: pending in windows when network off
Browse files Browse the repository at this point in the history
  • Loading branch information
classicalliu committed Nov 26, 2019
1 parent 84f8f1e commit 67dcb79
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/neuron-wallet/src/startup/sync-block-task/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import { distinctUntilChanged } from 'rxjs/operators'
import LockUtils from 'models/lock-utils'
import DaoUtils from 'models/dao-utils'
import NetworkSwitchSubject from 'models/subjects/network-switch-subject'
import { SyncedBlockNumberSubject } from 'models/subjects/node'
import BlockNumber from 'services/sync/block-number'

export { genesisBlockHash }

Expand All @@ -36,6 +38,8 @@ const networkChange = async (network: NetworkWithID) => {
DaoUtils.cleanInfo()
const info = await InitDatabase.getInstance().init(network)

const blockNumber = await (new BlockNumber()).getCurrent()
SyncedBlockNumberSubject.next(blockNumber.toString())
DataUpdateSubject.next({
dataType: 'transaction',
actionType: 'update',
Expand Down

0 comments on commit 67dcb79

Please sign in to comment.