Skip to content

Commit

Permalink
fix: Skip filter internal full node and internal full node must be ma…
Browse files Browse the repository at this point in the history
…innet.
  • Loading branch information
yanguoyu committed Nov 7, 2023
1 parent e97f8d6 commit 35c4063
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 1 addition & 2 deletions packages/neuron-ui/src/components/NetworkSetting/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ const NetworkSetting = ({ chain = chainState, settings: { networks = [] } }: Sta
}, [currentId, networks])

const showNetworks = useMemo(() => {
const internalFullNodeId = lastShowInternalNodeIds.get(NetworkType.Default)
const internalLightNodeId = lastShowInternalNodeIds.get(NetworkType.Light)
return networks.filter(v => !v.readonly || v.id === internalFullNodeId || v.id === internalLightNodeId)
return networks.filter(v => v.type !== NetworkType.Light || v.id === internalLightNodeId)
}, [currentId, networks])

return (
Expand Down
3 changes: 0 additions & 3 deletions packages/neuron-wallet/src/services/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,6 @@ export default class NetworksService extends Store {
if (currentNetwork.id === lightClientNetwork[1].id) {
// set light client default mainnet
this.writeSync(NetworksKey.Current, lightClientNetwork[0].id)
} else if (currentNetwork.id === presetNetworks.selected && currentNetwork.genesisHash === TESTNET_GENESIS_HASH) {
// if the network info has been changed to testnet by connected network
this.writeSync(NetworksKey.Current, presetNetworks.networks[1].id)
}
this.writeSync(NetworksKey.AddInternalNetwork, true)
}
Expand Down

0 comments on commit 35c4063

Please sign in to comment.