Skip to content

Commit 17c1715

Browse files
committed
feat: If chain info couldn't be fetched set as ckb_dev
when updating/creating a network
1 parent ac30da1 commit 17c1715

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/neuron-wallet/src/services/networks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export default class NetworksService extends Store {
134134
const chain = await core.rpc
135135
.getBlockchainInfo()
136136
.then(info => info.chain)
137-
.catch(() => '')
137+
.catch(() => 'ckb_dev')
138138
const genesisHash = await core.rpc
139139
.getBlockHash('0x0')
140140
.catch(() => '0x')
@@ -167,7 +167,7 @@ export default class NetworksService extends Store {
167167
const chain = await core.rpc
168168
.getBlockchainInfo()
169169
.then(info => info.chain)
170-
.catch(() => '')
170+
.catch(() => 'ckb_dev')
171171
network.chain = chain
172172

173173
const genesisHash = await core.rpc

0 commit comments

Comments
 (0)