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.controller.init()
|
||||||
self.view.load()
|
self.view.load()
|
||||||
self.view.setAreTestNetworksEnabled(self.controller.areTestNetworksEnabled())
|
self.view.setAreTestNetworksEnabled(self.controller.areTestNetworksEnabled())
|
||||||
|
self.view.setIsSepoliaEnabled(self.controller.isSepoliaEnabled())
|
||||||
self.refreshNetworks()
|
self.refreshNetworks()
|
||||||
|
|
||||||
method isLoaded*(self: Module): bool =
|
method isLoaded*(self: Module): bool =
|
||||||
|
|
|
@ -406,9 +406,7 @@ SettingsContentBase {
|
||||||
text: qsTr("Enable Sepolia as Test Network")
|
text: qsTr("Enable Sepolia as Test Network")
|
||||||
isSwitch: true
|
isSwitch: true
|
||||||
switchChecked: root.advancedStore.isSepoliaEnabled
|
switchChecked: root.advancedStore.isSepoliaEnabled
|
||||||
onClicked: {
|
onClicked: Global.openPopup(enableSepoliaConfirmationDialogComponent)
|
||||||
root.advancedStore.toggleIsSepoliaEnabled()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusSettingsLineButton {
|
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 {
|
Component {
|
||||||
id: enableDeveloperFeaturesConfirmationDialogComponent
|
id: enableDeveloperFeaturesConfirmationDialogComponent
|
||||||
ConfirmationDialog {
|
ConfirmationDialog {
|
||||||
|
|
Loading…
Reference in New Issue