fix(@wallet): Sepolia toggle
This commit is contained in:
parent
dbd7937d8b
commit
40e00c0602
|
@ -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 =
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue