mirror of
https://github.com/status-im/status-lib.git
synced 2025-01-12 21:44:57 +00:00
parse remainingAttempts from wrong pin error
(cherry picked from commit f6fa69e9dcc8bf251f85a594a1e6340a848e85dc)
This commit is contained in:
parent
d852f24a0a
commit
c4d60013fd
@ -65,7 +65,7 @@ method keycardVerifyPin*(self: StatusGoBackend, pin: string) =
|
|||||||
let response = keycard_go.verifyPin($inputJSON)
|
let response = keycard_go.verifyPin($inputJSON)
|
||||||
let parsedResponse = parseJson(response)
|
let parsedResponse = parseJson(response)
|
||||||
if not parsedResponse{"ok"}.getBool():
|
if not parsedResponse{"ok"}.getBool():
|
||||||
raise KeycardVerifyPINException(error: parsedResponse{"error"}.getStr())
|
raise KeycardVerifyPINException(error: parsedResponse{"error"}.getStr(), remainingAttempts: parsedResponse{"remainingAttempts"}.getInt())
|
||||||
|
|
||||||
method keycardExportKey*(self: StatusGoBackend, derive: bool, makeCurrent: bool, onlyPublic: bool, path: string): KeycardExportedKey =
|
method keycardExportKey*(self: StatusGoBackend, derive: bool, makeCurrent: bool, onlyPublic: bool, path: string): KeycardExportedKey =
|
||||||
let inputJSON = %* {
|
let inputJSON = %* {
|
||||||
|
@ -18,7 +18,7 @@ type KeycardUnpairException* = ref object of KeycardException
|
|||||||
type KeycardGenerateKeyException* = ref object of KeycardException
|
type KeycardGenerateKeyException* = ref object of KeycardException
|
||||||
|
|
||||||
type KeycardVerifyPINException* = ref object of KeycardException
|
type KeycardVerifyPINException* = ref object of KeycardException
|
||||||
pinRetry*: int64
|
remainingAttempts*: int64
|
||||||
|
|
||||||
type KeycardExportKeyException* = ref object of KeycardException
|
type KeycardExportKeyException* = ref object of KeycardException
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user