Skip to content

Commit

Permalink
feat: mistake sync status
Browse files Browse the repository at this point in the history
  • Loading branch information
devchenyan committed Jun 6, 2024
1 parent 37b0fbb commit 8205c9a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/neuron-wallet/src/controllers/sync-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,12 @@ export default class SyncApiController {
const rpcService = new RpcService(network.remote, network.type)
try {
const syncState = await rpcService.getSyncState()
let bestKnownBlockNumber = parseInt(syncState.bestKnownBlockNumber, 16)
if (network.chain === 'ckb_dev') {
bestKnownBlockNumber = parseInt(await rpcService.getTipBlockNumber(), 16)
}
return {
bestKnownBlockNumber: parseInt(syncState.bestKnownBlockNumber, 16),
bestKnownBlockNumber,
bestKnownBlockTimestamp: +syncState.bestKnownBlockTimestamp,
}
} catch (error) {
Expand Down

1 comment on commit 8205c9a

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 9394096725

Please sign in to comment.