fix(accountDerivation): App is crashing when the account derivation fails in status-go
The crash is caused by missing `derivedAddresses` property on the response of fetchDerivedAddresses task
This commit is contained in:
parent
8febd4d53d
commit
bf62ef0366
|
@ -474,7 +474,11 @@ proc setDerivedAddresses[T](self: Module[T], derivedAddresses: seq[DerivedAddres
|
|||
method onDerivedAddressesFetched*[T](self: Module[T], derivedAddresses: seq[DerivedAddressDto], error: string) =
|
||||
if error.len > 0:
|
||||
error "fetching derived addresses error", err=error
|
||||
self.fetchingAddressesIsInProgress = false
|
||||
if self.authenticationReason == AuthenticationReason.AddingAccount:
|
||||
self.view.setDisablePopup(false)
|
||||
return
|
||||
|
||||
let selectedOrigin = self.view.getSelectedOrigin()
|
||||
if selectedOrigin.getPairType() != KeyPairType.Profile.int and
|
||||
selectedOrigin.getPairType() != KeyPairType.SeedImport.int:
|
||||
|
|
|
@ -13,7 +13,7 @@ type
|
|||
const fetchDerivedAddressesTask*: Task = proc(argEncoded: string) {.gcsafe, nimcall.} =
|
||||
let arg = decode[FetchDerivedAddressesTaskArg](argEncoded)
|
||||
var output = %*{
|
||||
"derivedAddress": "",
|
||||
"derivedAddresses": "",
|
||||
"error": ""
|
||||
}
|
||||
try:
|
||||
|
@ -30,7 +30,7 @@ type
|
|||
const fetchDerivedAddressesForMnemonicTask*: Task = proc(argEncoded: string) {.gcsafe, nimcall.} =
|
||||
let arg = decode[FetchDerivedAddressesForMnemonicTaskArg](argEncoded)
|
||||
var output = %*{
|
||||
"derivedAddress": "",
|
||||
"derivedAddresses": "",
|
||||
"error": ""
|
||||
}
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue