Skip to content

Commit

Permalink
feat: If chain info couldn't be fetched set as ckb_dev
Browse files Browse the repository at this point in the history
when updating/creating a network
  • Loading branch information
ashchan committed Nov 15, 2019
1 parent ac30da1 commit 17c1715
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/neuron-wallet/src/services/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export default class NetworksService extends Store {
const chain = await core.rpc
.getBlockchainInfo()
.then(info => info.chain)
.catch(() => '')
.catch(() => 'ckb_dev')
const genesisHash = await core.rpc
.getBlockHash('0x0')
.catch(() => '0x')
Expand Down Expand Up @@ -167,7 +167,7 @@ export default class NetworksService extends Store {
const chain = await core.rpc
.getBlockchainInfo()
.then(info => info.chain)
.catch(() => '')
.catch(() => 'ckb_dev')
network.chain = chain

const genesisHash = await core.rpc
Expand Down

0 comments on commit 17c1715

Please sign in to comment.