From 4e30c510dd1e933304c8d95d9f0fc004443bc5e1 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Tue, 21 Dec 2021 10:03:34 -0400 Subject: [PATCH] feat: use loginWithConfig instead of login --- status/statusgo_backend_new/accounts.nim | 11 ++++++++++- vendor/nim-status-go | 2 +- vendor/status-go | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/status/statusgo_backend_new/accounts.nim b/status/statusgo_backend_new/accounts.nim index 4516ec2..ee3aaf0 100644 --- a/status/statusgo_backend_new/accounts.nim +++ b/status/statusgo_backend_new/accounts.nim @@ -219,7 +219,16 @@ proc login*(name, keyUid, hashedPassword, identicon, thumbnail, large: string): if(thumbnail.len>0 and large.len > 0): payload["identityImage"] = %* {"thumbnail": thumbnail, "large": large} - let response = status_go.login($payload, hashedPassword) + # TODO: + # If you added a new value in the nodeconfig in status-go, old accounts will not have this value, since the node config + # is stored in the database, and it's not easy to migrate using .sql + # While this is fixed, you can add here any missing attribute on the node config, and it will be merged with whatever + # the account has in the db + var nodeCfg = %* { + + } + + let response = status_go.loginWithConfig($payload, hashedPassword, $nodeCfg) result.result = Json.decode(response, JsonNode) except RpcException as e: diff --git a/vendor/nim-status-go b/vendor/nim-status-go index b60faf9..e579401 160000 --- a/vendor/nim-status-go +++ b/vendor/nim-status-go @@ -1 +1 @@ -Subproject commit b60faf96449cb9ba9c6494abf7a3fcbaa7849c17 +Subproject commit e579401e2dc489c387ed46c80090cf3d1b050a92 diff --git a/vendor/status-go b/vendor/status-go index abbd796..0596039 160000 --- a/vendor/status-go +++ b/vendor/status-go @@ -1 +1 @@ -Subproject commit abbd796e0c56402e0723c407119cabbb9fbd5d73 +Subproject commit 059603986c8b11d47ab2def7436354881cb9bff6