diff --git a/status/statusgo_backend/accounts/constants.nim b/status/statusgo_backend/accounts/constants.nim index 2612bb9..a93a31c 100644 --- a/status/statusgo_backend/accounts/constants.nim +++ b/status/statusgo_backend/accounts/constants.nim @@ -155,6 +155,12 @@ var NODE_CONFIG* = %* { "VerifyTransactionChainID": 1, "VerifyTransactionURL": "https://mainnet.infura.io/v3/" & INFURA_TOKEN_RESOLVED }, + "Web3ProviderConfig": { + "Enabled": true + }, + "EnsConfig": { + "Enabled": true + }, "StatusAccountsConfig": { "Enabled": true }, diff --git a/status/statusgo_backend_new/accounts.nim b/status/statusgo_backend_new/accounts.nim index 1a5d775..85549be 100644 --- a/status/statusgo_backend_new/accounts.nim +++ b/status/statusgo_backend_new/accounts.nim @@ -202,7 +202,7 @@ proc saveAccountAndLogin*(hashedPassword: string, account, subaccounts, settings error "error doing rpc request", methodName = "saveAccountAndLogin", exception=e.msg raise newException(RpcException, e.msg) -proc login*(name, keyUid, hashedPassword, identicon, thumbnail, large: string): +proc login*(name, keyUid, hashedPassword, identicon, thumbnail, large: string, nodeCfgObj: string): RpcResponse[JsonNode] {.raises: [Exception].} = try: @@ -216,24 +216,7 @@ proc login*(name, keyUid, hashedPassword, identicon, thumbnail, large: string): if(thumbnail.len>0 and large.len > 0): payload["identityImage"] = %* {"thumbnail": thumbnail, "large": large} - # 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 = %* { - "ShhextConfig": %* { - "EnableMailserverCycle": true - }, - "Web3ProviderConfig": %* { - "Enabled": true - }, - "EnsConfig": %* { - "Enabled": true - }, - } - - let response = status_go.loginWithConfig($payload, hashedPassword, $nodeCfg) + let response = status_go.loginWithConfig($payload, hashedPassword, nodeCfgObj) result.result = Json.decode(response, JsonNode) except RpcException as e: