refactor: mailserver_cycle (base_bc)
This commit is contained in:
parent
ad280888e0
commit
cea9a81863
|
@ -155,6 +155,12 @@ var NODE_CONFIG* = %* {
|
||||||
"VerifyTransactionChainID": 1,
|
"VerifyTransactionChainID": 1,
|
||||||
"VerifyTransactionURL": "https://mainnet.infura.io/v3/" & INFURA_TOKEN_RESOLVED
|
"VerifyTransactionURL": "https://mainnet.infura.io/v3/" & INFURA_TOKEN_RESOLVED
|
||||||
},
|
},
|
||||||
|
"Web3ProviderConfig": {
|
||||||
|
"Enabled": true
|
||||||
|
},
|
||||||
|
"EnsConfig": {
|
||||||
|
"Enabled": true
|
||||||
|
},
|
||||||
"StatusAccountsConfig": {
|
"StatusAccountsConfig": {
|
||||||
"Enabled": true
|
"Enabled": true
|
||||||
},
|
},
|
||||||
|
|
|
@ -202,7 +202,7 @@ proc saveAccountAndLogin*(hashedPassword: string, account, subaccounts, settings
|
||||||
error "error doing rpc request", methodName = "saveAccountAndLogin", exception=e.msg
|
error "error doing rpc request", methodName = "saveAccountAndLogin", exception=e.msg
|
||||||
raise newException(RpcException, 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]
|
RpcResponse[JsonNode]
|
||||||
{.raises: [Exception].} =
|
{.raises: [Exception].} =
|
||||||
try:
|
try:
|
||||||
|
@ -216,24 +216,7 @@ proc login*(name, keyUid, hashedPassword, identicon, thumbnail, large: string):
|
||||||
if(thumbnail.len>0 and large.len > 0):
|
if(thumbnail.len>0 and large.len > 0):
|
||||||
payload["identityImage"] = %* {"thumbnail": thumbnail, "large": large}
|
payload["identityImage"] = %* {"thumbnail": thumbnail, "large": large}
|
||||||
|
|
||||||
# TODO:
|
let response = status_go.loginWithConfig($payload, hashedPassword, nodeCfgObj)
|
||||||
# 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)
|
|
||||||
result.result = Json.decode(response, JsonNode)
|
result.result = Json.decode(response, JsonNode)
|
||||||
|
|
||||||
except RpcException as e:
|
except RpcException as e:
|
||||||
|
|
Loading…
Reference in New Issue