Skip to content

Commit

Permalink
fix: wrong sync status when using devnet (#3183)
Browse files Browse the repository at this point in the history
* feat: mistake sync status

* fix: comment

---------

Co-authored-by: Chen Yu <[email protected]>
  • Loading branch information
devchenyan and Keith-CY authored Jun 12, 2024
1 parent 77d99fb commit aa100d7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 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,10 @@ export default class SyncApiController {
const rpcService = new RpcService(network.remote, network.type)
try {
const syncState = await rpcService.getSyncState()
const bestKnownBlockNumber =
network.chain === 'ckb_dev' ? await rpcService.getTipBlockNumber() : syncState.bestKnownBlockNumber
return {
bestKnownBlockNumber: parseInt(syncState.bestKnownBlockNumber, 16),
bestKnownBlockNumber: parseInt(bestKnownBlockNumber, 16),
bestKnownBlockTimestamp: +syncState.bestKnownBlockTimestamp,
}
} catch (error) {
Expand Down

1 comment on commit aa100d7

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

Please sign in to comment.