From aa100d7832abcddcc6657c94986c3d56afa56645 Mon Sep 17 00:00:00 2001 From: devchenyan Date: Wed, 12 Jun 2024 16:43:35 +0800 Subject: [PATCH] fix: wrong sync status when using devnet (#3183) * feat: mistake sync status * fix: comment --------- Co-authored-by: Chen Yu --- packages/neuron-wallet/src/controllers/sync-api.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/neuron-wallet/src/controllers/sync-api.ts b/packages/neuron-wallet/src/controllers/sync-api.ts index 5207cc6ec4..69b9603f76 100644 --- a/packages/neuron-wallet/src/controllers/sync-api.ts +++ b/packages/neuron-wallet/src/controllers/sync-api.ts @@ -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) {