chore: remove wakuv2 store config (#13018)

This commit is contained in:
kaichao 2023-12-23 10:42:16 +08:00 committed by GitHub
parent f5d6c09a51
commit 55d0a3efb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 0 additions and 95 deletions

View File

@ -56,17 +56,6 @@ proc setBloomLevel*(self: Controller, bloomLevel: string) =
self.delegate.onBloomLevelSet()
proc toggleWakuV2Store*(self: Controller) =
let enabled = self.nodeConfigurationService.isWakuV2StoreEnabled()
if (not self.nodeConfigurationService.setWakuV2StoreEnabled(not enabled)):
# in the future we may do a call from here to show a popup about this error
error "an error occurred, we couldn't enable community history archive support"
return
self.delegate.onWakuV2StoreToggled()
proc isWakuV2StoreEnabled*(self: Controller): bool =
return self.nodeConfigurationService.isWakuV2StoreEnabled()
proc getLogMaxBackups*(self: Controller): int =
return self.nodeConfigurationService.getLogMaxBackups()

View File

@ -21,9 +21,6 @@ method onFleetSet*(self: AccessInterface) {.base.} =
method onBloomLevelSet*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")
method onWakuV2StoreToggled*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")
method onWakuV2LightClientSet*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")
@ -96,12 +93,6 @@ method toggleNodeManagementSection*(self: AccessInterface) {.base.} =
method enableDeveloperFeatures*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")
method isWakuV2StoreEnabled*(self: AccessInterface): bool {.base.} =
raise newException(ValueError, "No implementation available")
method toggleWakuV2Store*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")
method getLogMaxBackups*(self: AccessInterface): int {.base.} =
raise newException(ValueError, "No implementation available")

View File

@ -130,15 +130,6 @@ method toggleCommunitiesPortalSection*(self: Module) =
method toggleNodeManagementSection*(self: Module) =
self.controller.toggleNodeManagementSection()
method onWakuV2StoreToggled*(self: Module) =
self.view.emitWakuV2StoreEnabledSignal()
method toggleWakuV2Store*(self: Module) =
self.controller.toggleWakuV2Store()
method isWakuV2StoreEnabled*(self: Module): bool =
self.controller.isWakuV2StoreEnabled()
method getLogMaxBackups*(self: Module): int =
self.controller.getLogMaxBackups()

View File

@ -120,19 +120,6 @@ QtObject:
proc toggleCommunitiesPortalSection*(self: View) {.slot.} =
self.delegate.toggleCommunitiesPortalSection()
proc isWakuV2StoreEnabledChanged*(self: View) {.signal.}
proc getIsWakuV2StoreEnabled*(self: View): bool {.slot.} =
return self.delegate.isWakuV2StoreEnabled()
QtProperty[bool] isWakuV2StoreEnabled:
read = getIsWakuV2StoreEnabled
notify = isWakuV2StoreEnabledChanged
proc emitWakuV2StoreEnabledSignal*(self: View) =
self.isWakuV2StoreEnabledChanged()
proc toggleWakuV2Store*(self: View) {.slot.} =
self.delegate.toggleWakuV2Store()
proc logMaxBackupsChanged*(self: View) {.signal.}
proc getLogMaxBackups*(self: View): int {.slot.} =
return self.delegate.getLogMaxBackups()

View File

@ -287,16 +287,6 @@ proc isV2LightMode*(self: Service): bool =
proc isFullNode*(self: Service): bool =
return self.configuration.WakuConfig.FullNode
proc isWakuV2StoreEnabled*(self: Service): bool =
return self.configuration.WakuV2Config.EnableStore
proc setWakuV2StoreEnabled*(self: Service, enabled: bool, storeCapacity: int = 0, storeSeconds: int = 0): bool =
var newConfiguration = self.configuration
newConfiguration.WakuV2Config.EnableStore = enabled
newConfiguration.WakuV2Config.StoreCapacity = storeCapacity
newConfiguration.WakuV2Config.StoreSeconds = storeSeconds
return self.saveConfiguration(newConfiguration)
proc getLogMaxBackups*(self: Service): int =
return self.configuration.LogMaxBackups

View File

@ -217,8 +217,6 @@ QtObject {
property var walletSectionSendInst: walletSectionSend
property bool isWakuV2StoreEnabled: advancedModule ? advancedModule.isWakuV2StoreEnabled : false
property string communityTags: communitiesModule.tags
property var stickersModuleInst: stickersModule

View File

@ -15,7 +15,6 @@ QtObject {
property bool isTelemetryEnabled: advancedModule? advancedModule.isTelemetryEnabled : false
property bool isAutoMessageEnabled: advancedModule? advancedModule.isAutoMessageEnabled : false
property bool isDebugEnabled: advancedModule? advancedModule.isDebugEnabled : false
property bool isWakuV2StoreEnabled: advancedModule ? advancedModule.isWakuV2StoreEnabled : false
readonly property bool isWakuV2ShardedCommunitiesEnabled: localAppSettings.wakuV2ShardedCommunitiesEnabled ?? false
property int logMaxBackups: advancedModule ? advancedModule.logMaxBackups : 1
@ -38,7 +37,6 @@ QtObject {
readonly property string communitiesPortal: "communitiesPortal"
readonly property string communityPermissions: "communityPermissions"
readonly property string discordImportTool: "discordImportTool"
readonly property string wakuV2StoreEnabled: "wakuV2StoreEnabled"
readonly property string communityTokens: "communityTokens"
}
@ -131,10 +129,6 @@ QtObject {
else if (feature === experimentalFeatures.communitiesPortal) {
advancedModule.toggleCommunitiesPortalSection()
}
else if (feature === experimentalFeatures.wakuV2StoreEnabled) {
// toggle history archive support
advancedModule.toggleWakuV2Store()
}
else if (feature === experimentalFeatures.activityCenter) {
localAccountSensitiveSettings.isActivityCenterEnabled = !localAccountSensitiveSettings.isActivityCenterEnabled
}

View File

@ -193,19 +193,6 @@ SettingsContentBase {
onClicked: root.advancedStore.toggleWakuV2ShardedCommunities()
}
// TODO: replace with StatusQ component
StatusSettingsLineButton {
anchors.leftMargin: 0
anchors.rightMargin: 0
text: qsTr("WakuV2 Store")
isSwitch: true
visible: root.advancedStore.isWakuV2
switchChecked: root.advancedStore.isWakuV2StoreEnabled
onClicked: {
Global.openPopup(enableWakuV2StoreComponent)
}
}
StatusListItem {
anchors.left: parent.left
anchors.right: parent.right
@ -580,28 +567,6 @@ SettingsContentBase {
}
}
Component {
id: enableWakuV2StoreComponent
ConfirmationDialog {
property bool mode: false
id: confirmDialog
destroyOnClose: true
showCancelButton: true
confirmationText: qsTr("Are you sure you want to %1 WakuV2 Store? You need to restart the app for this change to take effect.")
.arg(root.advancedStore.isWakuV2StoreEnabled ?
qsTr("disable") :
qsTr("enable"))
onConfirmButtonClicked: {
root.advancedStore.toggleExperimentalFeature(root.advancedStore.experimentalFeatures.wakuV2StoreEnabled)
close()
}
onCancelButtonClicked: {
close()
}
}
}
Component {
id: enableDebugComponent
ConfirmationDialog {