Skip to content

Commit 9d2cc2a

Browse files
committed
fix: comments
1 parent 5f56859 commit 9d2cc2a

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

packages/neuron-wallet/src/utils/ckb-rpc.ts

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
import CommonUtils from './common'
1414
import { NetworkType } from '../models/network'
1515
import type { RPCConfig } from '@ckb-lumos/rpc/lib/types/common'
16+
import { RPC } from '@ckb-lumos/rpc/lib/types/rpc'
1617

1718
export interface LightScriptFilter {
1819
script: Script
@@ -22,6 +23,11 @@ export interface LightScriptFilter {
2223

2324
export type LightScriptSyncStatus = LightScriptFilter
2425

26+
interface ExtendedSyncState extends RPC.SyncState {
27+
assume_valid_target: string
28+
assume_valid_target_reached: boolean
29+
}
30+
2531
const lightRPCProperties: Record<string, Omit<Parameters<CKBRPC['addMethod']>[0], 'name'>> = {
2632
setScripts: {
2733
method: 'set_scripts',
@@ -133,18 +139,7 @@ export class FullCKBRPC extends CKBRPC {
133139
name: 'getSyncState',
134140
method: 'sync_state',
135141
paramsFormatters: [],
136-
resultFormatters: (state: {
137-
assume_valid_target: string
138-
assume_valid_target_reached: boolean
139-
best_known_block_number: any
140-
best_known_block_timestamp: any
141-
fast_time: any
142-
ibd: any
143-
inflight_blocks_count: any
144-
low_time: any
145-
normal_time: any
146-
orphan_blocks_count: any
147-
}) => {
142+
resultFormatters: (state: ExtendedSyncState) => {
148143
if (!state) {
149144
return state
150145
}

0 commit comments

Comments
 (0)