fix: getNodeConfig
This commit is contained in:
parent
42a31f66b3
commit
d8053f5291
|
@ -469,5 +469,5 @@ QtObject:
|
||||||
debug "Requesting messages"
|
debug "Requesting messages"
|
||||||
# TODO: the mailservers must change depending on whether we are using wakuV1 or wakuV2
|
# TODO: the mailservers must change depending on whether we are using wakuV1 or wakuV2
|
||||||
# in the meantime I'm hardcoding a specific mailserver
|
# in the meantime I'm hardcoding a specific mailserver
|
||||||
echo self.status.mailservers.setMailserver("16Uiu2HAmVVi6Q4j7MAKVibquW8aA27UNrA4Q8Wkz9EetGViu8ZF1")
|
echo self.status.mailservers.setMailserver("16Uiu2HAm4v86W3bmT1BiH6oSPzcsSr24iDQpSN5Qa992BCjjwgrD")
|
||||||
echo self.status.mailservers.requestAllHistoricMessages()
|
echo self.status.mailservers.requestAllHistoricMessages()
|
||||||
|
|
|
@ -85,5 +85,9 @@ QtObject:
|
||||||
proc init*(self: NodeView) {.slot.} =
|
proc init*(self: NodeView) {.slot.} =
|
||||||
self.wakuBloomFilterMode = self.status.settings.getSetting[:bool](Setting.WakuBloomFilterMode)
|
self.wakuBloomFilterMode = self.status.settings.getSetting[:bool](Setting.WakuBloomFilterMode)
|
||||||
|
|
||||||
|
proc wakuVersion*(self: NodeView): int {.slot.} =
|
||||||
|
var fleetStr = self.status.settings.getSetting[:string](Setting.Fleet)
|
||||||
|
let fleet = parseEnum[Fleet](fleetStr)
|
||||||
|
let isWakuV2 = if fleet == WakuV2Prod or fleet == WakuV2Test: true else: false
|
||||||
|
if isWakuV2: return 2
|
||||||
|
return 1
|
||||||
|
|
|
@ -194,8 +194,7 @@ proc setupAccount*(fleetConfig: FleetConfig, account: GeneratedAccount, password
|
||||||
let accountData = getAccountData(account)
|
let accountData = getAccountData(account)
|
||||||
let installationId = $genUUID()
|
let installationId = $genUUID()
|
||||||
var settingsJSON = getAccountSettings(account, constants.DEFAULT_NETWORKS, installationId)
|
var settingsJSON = getAccountSettings(account, constants.DEFAULT_NETWORKS, installationId)
|
||||||
var nodeConfig = getNodeConfig(fleetConfig, installationId, constants.DEFAULT_NETWORK_NAME, Fleet.PROD, true)
|
var nodeConfig = getNodeConfig(fleetConfig, installationId, constants.DEFAULT_NETWORK_NAME, Fleet.PROD, false, true)
|
||||||
|
|
||||||
result = saveAccountAndLogin(account, $accountData, password, $nodeConfig, $settingsJSON)
|
result = saveAccountAndLogin(account, $accountData, password, $nodeConfig, $settingsJSON)
|
||||||
|
|
||||||
except StatusGoException as e:
|
except StatusGoException as e:
|
||||||
|
|
|
@ -139,5 +139,4 @@ proc setWakuVersion*(newVersion: int) =
|
||||||
nodeConfig["NoDiscovery"] = newJBool(true)
|
nodeConfig["NoDiscovery"] = newJBool(true)
|
||||||
nodeConfig["Rendezvous"] = newJBool(false)
|
nodeConfig["Rendezvous"] = newJBool(false)
|
||||||
discard saveSetting(Setting.NodeConfig, nodeConfig)
|
discard saveSetting(Setting.NodeConfig, nodeConfig)
|
||||||
echo $nodeConfig
|
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,13 @@ StatusPopupMenu {
|
||||||
visible: viewProfileMenuItem.enabled
|
visible: viewProfileMenuItem.enabled
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Action {
|
||||||
|
enabled: profileModel.fleets.fleet == Constants.waku_prod || profileModel.fleets.fleet == Constants.waku_test
|
||||||
|
text: qsTr("Test WakuV2 - requestAllHistoricMessages")
|
||||||
|
onTriggered: chatsModel.requestAllHistoricMessages()
|
||||||
|
}
|
||||||
|
|
||||||
StatusMenuItem {
|
StatusMenuItem {
|
||||||
text: chatItem && chatItem.muted ?
|
text: chatItem && chatItem.muted ?
|
||||||
//% "Unmute chat"
|
//% "Unmute chat"
|
||||||
|
|
|
@ -137,6 +137,7 @@ Item {
|
||||||
|
|
||||||
StatusSettingsLineButton {
|
StatusSettingsLineButton {
|
||||||
//% "Waku Bloom Mode"
|
//% "Waku Bloom Mode"
|
||||||
|
visible: profileModel.fleets.fleet != Constants.waku_prod && profileModel.fleets.fleet != Constants.waku_test
|
||||||
text: qsTrId("waku-bloom-mode")
|
text: qsTrId("waku-bloom-mode")
|
||||||
isSwitch: true
|
isSwitch: true
|
||||||
switchChecked: nodeModel.wakuBloomFilterMode
|
switchChecked: nodeModel.wakuBloomFilterMode
|
||||||
|
@ -152,7 +153,7 @@ Item {
|
||||||
id: confirmDialog
|
id: confirmDialog
|
||||||
//% "Warning!"
|
//% "Warning!"
|
||||||
title: qsTrId("close-app-title")
|
title: qsTrId("close-app-title")
|
||||||
confirmationText: qsTrId("The account will be logged out. When you login again, the selected mode will be enabled")
|
confirmationText: qsTr("The account will be logged out. When you login again, the selected mode will be enabled")
|
||||||
onConfirmButtonClicked: {
|
onConfirmButtonClicked: {
|
||||||
nodeModel.setWakuBloomFilterMode(bloomFilterMode)
|
nodeModel.setWakuBloomFilterMode(bloomFilterMode)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue