Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix_: bad node config migration #21952

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.32.0
2.32.21952
3 changes: 2 additions & 1 deletion src/status_im/contexts/keycard/effects.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@
(rf/reg-fx :effects.keycard/login-with-keycard
(fn [{:keys [key-uid password whisper-private-key]}]
(native-module/login-account
(assoc (profile.config/login)
(assoc (merge (profile.config/login)
(profile.config/fix-node-config-migration))
:keyUid key-uid
:password password
:keycardWhisperPrivateKey whisper-private-key))))
Expand Down
43 changes: 25 additions & 18 deletions src/status_im/contexts/profile/config.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,35 @@
:alchemyBaseMainnetToken config/ALCHEMY_BASE_MAINNET_TOKEN
:alchemyBaseSepoliaToken config/ALCHEMY_BASE_SEPOLIA_TOKEN})

(defn- common-config
[]
{:verifyTransactionURL config/verify-transaction-url
:verifyENSURL config/verify-ens-url
:verifyENSContractAddress config/verify-ens-contract-address
:verifyTransactionChainID config/verify-transaction-chain-id
:wakuV2LightClient true
:wakuV2EnableMissingMessageVerification true
:wakuV2EnableStoreConfirmationForMessagesSent false})

(defn fix-node-config-migration
[]
(common-config))

(defn create
[]
(let [log-enabled? (boolean (not-empty config/log-level))]
(assoc
(merge
(login)
:deviceName (native-module/get-installation-name)
:rootDataDir (native-module/backup-disabled-data-dir)
:rootKeystoreDir (native-module/keystore-dir)
:logLevel (when log-enabled? config/log-level)
:logEnabled log-enabled?
:logFilePath (native-module/log-file-directory)
:verifyTransactionURL config/verify-transaction-url
:verifyENSURL config/verify-ens-url
:verifyENSContractAddress config/verify-ens-contract-address
:verifyTransactionChainID config/verify-transaction-chain-id
:wakuV2LightClient true
:wakuV2Fleet config/fleet
;; NOTE: https://github.com/status-im/status-go/pull/5570#discussion_r1690794119
:wakuV2EnableMissingMessageVerification true
:wakuV2EnableStoreConfirmationForMessagesSent false
:previewPrivacy config/blank-preview?
:testNetworksEnabled config/test-networks-enabled?)))
(common-config)
{:deviceName (native-module/get-installation-name)
:rootDataDir (native-module/backup-disabled-data-dir)
:rootKeystoreDir (native-module/keystore-dir)
:logLevel (when log-enabled? config/log-level)
:logEnabled log-enabled?
:logFilePath (native-module/log-file-directory)
:wakuV2Fleet config/fleet
:previewPrivacy config/blank-preview?
:testNetworksEnabled config/test-networks-enabled?})))

(defn strip-file-prefix
[path]
Expand Down
5 changes: 4 additions & 1 deletion src/status_im/contexts/profile/login/effects.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
(fn [[key-uid hashed-password]]
;;"node.login" signal will be triggered as a callback
(native-module/login-account
(assoc (profile.config/login) :keyUid key-uid :password hashed-password))))
(assoc (merge (profile.config/login)
(profile.config/fix-node-config-migration))
:keyUid key-uid
:password hashed-password))))

(rf/reg-fx :effects.profile/enable-local-notifications
(fn []
Expand Down
6 changes: 3 additions & 3 deletions status-go-version.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
"owner": "status-im",
"repo": "status-go",
"version": "v9.1.0",
"commit-sha1": "4ec885a91f2857a30d1838213000f0a5a91fd52a",
"src-sha256": "1fkvhazv7v2vyqpffx3r4p3aii5ai464nx2pdfgn6b6gmb24bxdq"
"version": "fix/node_config_migration",
"commit-sha1": "d7f725f4cbb482fd28125f1f00677347dc0b16d6",
"src-sha256": "0mwnlhn77m1kg3wra51pvizf1m0rcvlynfb83jmyj981slrh2kll"
}