Skip to content

Commit

Permalink
Do not change runtime to Emerald when switching network
Browse files Browse the repository at this point in the history
  • Loading branch information
buberdds committed Jan 16, 2024
1 parent 3799577 commit 8ec22aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .changelog/1152.bugifx.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Do not change runtime to Emerald when switching network
4 changes: 3 additions & 1 deletion src/app/components/ParaTimePicker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,10 @@ const ParaTimePickerContent: FC<ParaTimePickerContentProps> = ({ isOutOfDate, on
ParaTimePickerTabletStep.ParaTimeDetails,
)
const selectNetwork = (newNetwork: Network) => {
const enabledLayers = RouteUtils.getEnabledLayersForNetwork(newNetwork)
const targetLayer = enabledLayers.includes(selectedLayer) ? selectedLayer : enabledLayers[0]
setSelectedNetwork(newNetwork)
setSelectedLayer(RouteUtils.getEnabledLayersForNetwork(newNetwork)[0])
setSelectedLayer(targetLayer)
}
const handleConfirm = () => onConfirm(selectedNetwork, selectedLayer)

Expand Down

0 comments on commit 8ec22aa

Please sign in to comment.