diff --git a/src/app/modules/main/profile_section/wallet/networks/module.nim b/src/app/modules/main/profile_section/wallet/networks/module.nim index 6d99588b6e..5122355bc5 100644 --- a/src/app/modules/main/profile_section/wallet/networks/module.nim +++ b/src/app/modules/main/profile_section/wallet/networks/module.nim @@ -81,6 +81,7 @@ method load*(self: Module) = self.controller.init() self.view.load() self.view.setAreTestNetworksEnabled(self.controller.areTestNetworksEnabled()) + self.view.setIsSepoliaEnabled(self.controller.isSepoliaEnabled()) self.refreshNetworks() method isLoaded*(self: Module): bool = diff --git a/ui/app/AppLayouts/Profile/views/AdvancedView.qml b/ui/app/AppLayouts/Profile/views/AdvancedView.qml index fa13022b99..cb9d8dd261 100644 --- a/ui/app/AppLayouts/Profile/views/AdvancedView.qml +++ b/ui/app/AppLayouts/Profile/views/AdvancedView.qml @@ -406,9 +406,7 @@ SettingsContentBase { text: qsTr("Enable Sepolia as Test Network") isSwitch: true switchChecked: root.advancedStore.isSepoliaEnabled - onClicked: { - root.advancedStore.toggleIsSepoliaEnabled() - } + onClicked: Global.openPopup(enableSepoliaConfirmationDialogComponent) } StatusSettingsLineButton { @@ -454,6 +452,26 @@ SettingsContentBase { } } + Component { + id: enableSepoliaConfirmationDialogComponent + ConfirmationDialog { + property bool mode: false + + id: confirmDialog + destroyOnClose: true + showCancelButton: true + confirmationText: qsTr("Are you sure you want to toggle sepolia? The app will be restarted.") + onConfirmButtonClicked: { + root.advancedStore.toggleIsSepoliaEnabled() + close() + Qt.quit() + } + onCancelButtonClicked: { + close() + } + } + } + Component { id: enableDeveloperFeaturesConfirmationDialogComponent ConfirmationDialog {