mirror of
https://github.com/status-im/status-lib.git
synced 2025-01-12 13:35:00 +00:00
fix inverted if condition
This commit is contained in:
parent
d5592d0e0a
commit
8fd18ec1c4
@ -146,9 +146,9 @@ proc saveAccountAndLogin*(
|
|||||||
|
|
||||||
var savedResult =
|
var savedResult =
|
||||||
if account.isKeycard:
|
if account.isKeycard:
|
||||||
$status_go.saveAccountAndLogin(accountData, hashedPassword, settingsJSON, configJSON, $subaccountData)
|
|
||||||
else:
|
|
||||||
$status_go.saveAccountAndLoginWithKeycard(accountData, hashedPassword, settingsJSON, configJSON, $subaccountData, keycardWhisperKey)
|
$status_go.saveAccountAndLoginWithKeycard(accountData, hashedPassword, settingsJSON, configJSON, $subaccountData, keycardWhisperKey)
|
||||||
|
else:
|
||||||
|
$status_go.saveAccountAndLogin(accountData, hashedPassword, settingsJSON, configJSON, $subaccountData)
|
||||||
|
|
||||||
let parsedSavedResult = savedResult.parseJson
|
let parsedSavedResult = savedResult.parseJson
|
||||||
let error = parsedSavedResult["error"].getStr
|
let error = parsedSavedResult["error"].getStr
|
||||||
@ -243,9 +243,9 @@ proc login*(nodeAccount: NodeAccount, password: string, keycardWhisperKey: strin
|
|||||||
let account = nodeAccount.toAccount
|
let account = nodeAccount.toAccount
|
||||||
let loginResult =
|
let loginResult =
|
||||||
if account.isKeycard:
|
if account.isKeycard:
|
||||||
$status_go.login($toJson(account), hashedPassword)
|
|
||||||
else:
|
|
||||||
$status_go.loginWithKeycard($toJson(account), hashedPassword, keycardWhisperKey)
|
$status_go.loginWithKeycard($toJson(account), hashedPassword, keycardWhisperKey)
|
||||||
|
else:
|
||||||
|
$status_go.login($toJson(account), hashedPassword)
|
||||||
|
|
||||||
let error = parseJson(loginResult)["error"].getStr
|
let error = parseJson(loginResult)["error"].getStr
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user