Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ckb-light-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.2.3
v0.2.4
12 changes: 6 additions & 6 deletions packages/neuron-ui/src/components/NervosDAO/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -563,18 +563,18 @@ export const useUpdateDepositEpochList = ({
if (connectionStatus === 'online') {
getBlockHashes(records.map(v => v.depositOutPoint?.txHash).filter(v => !!v) as string[]).then(
depositBlockHashes => {
const recordKeyIdxMap = new Map<string, number>()
const recordKeyIdx: string[] = []
const batchParams: ['getHeader', string][] = []
records.forEach((record, idx) => {
records.forEach((record) => {
if (!record.depositOutPoint && record.blockHash) {
batchParams.push(['getHeader', record.blockHash])
recordKeyIdxMap.set(record.outPoint.txHash, idx)
recordKeyIdx.push(record.outPoint.txHash)
}
})
depositBlockHashes.forEach((v, idx) => {
depositBlockHashes.forEach((v) => {
if (v.blockHash) {
batchParams.push(['getHeader', v.blockHash])
recordKeyIdxMap.set(v.txHash, idx)
recordKeyIdx.push(v.txHash)
}
})
ckbCore.rpc
Expand All @@ -584,7 +584,7 @@ export const useUpdateDepositEpochList = ({
const epochList = new Map()
records.forEach(record => {
const key = record.depositOutPoint ? record.depositOutPoint.txHash : record.outPoint.txHash
epochList.set(key, recordKeyIdxMap.has(key) ? res[recordKeyIdxMap.get(key)!]?.epoch : null)
epochList.set(key, res[recordKeyIdx.indexOf(key)]?.epoch)
})
setDepositEpochList(epochList)
})
Expand Down
9 changes: 6 additions & 3 deletions packages/neuron-wallet/src/services/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,16 @@ class NodeService {
} else {
logger.info('CKB:\texternal RPC on default uri detected, skip starting bundled CKB node.')
this._isCkbNodeExternal = true
await this.verifyNodeVersion()
await this.verifyStartWithIndexer()
const network = NetworksService.getInstance().getCurrent()
if (network.type !== NetworkType.Light) {
await this.verifyNodeVersion()
await this.verifyStartWithIndexer()
}
}
}

public async isDefaultCKBNeedRestart() {
let network = NetworksService.getInstance().getCurrent()
const network = NetworksService.getInstance().getCurrent()
if (network.remote !== BUNDLED_CKB_URL && network.remote !== BUNDLED_LIGHT_CKB_URL) {
return false
}
Expand Down