Skip to content

Commit

Permalink
fix: comment
Browse files Browse the repository at this point in the history
  • Loading branch information
devchenyan committed Jun 7, 2024
1 parent 6e45e53 commit 24edf8b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/neuron-wallet/src/controllers/sync-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,10 @@ 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)
}
const bestKnownBlockNumber =
network.chain === 'ckb_dev' ? await rpcService.getTipBlockNumber() : syncState.bestKnownBlockNumber
return {
bestKnownBlockNumber,
bestKnownBlockNumber: parseInt(bestKnownBlockNumber, 16),
bestKnownBlockTimestamp: +syncState.bestKnownBlockTimestamp,
}
} catch (error) {
Expand Down

1 comment on commit 24edf8b

@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 9417244125

Please sign in to comment.