fix issue with calling getSettings; document issue

This commit is contained in:
Iuri Matias 2021-06-08 09:20:21 -04:00
parent 09f77177b0
commit 36c25aaab9
2 changed files with 11 additions and 1 deletions

View File

@ -78,6 +78,16 @@ If you are using an `Input` QML prop, to get the current value use `idName.TextF
a common scenario this error can happen is when trying to immediatly access something in status-go when the app starts before the node is ready. it can also happen due to 2 threads attempting to call & change something from status-go at the same time
### Error: type mismatch: got <> but expected one of:
Sometimes this can happen when using generics, it can be solved by either passing the parameters explicitily:
`getSetting[string](self.status.settings, Setting.SigningPhrase)`
or using typedesc param with `:` like:
`self.status.settings.getSetting[:string](Setting.SigningPhrase)`
## Warnings
### QML anchor warnings

View File

@ -48,7 +48,7 @@ proc init*(self: WalletController) =
self.status.events.on("assetChanged") do(e: Args):
self.view.updateView()
self.view.setSigningPhrase(self.status.settings.getSetting[string](Setting.SigningPhrase))
self.view.setSigningPhrase(self.status.settings.getSetting[:string](Setting.SigningPhrase))
self.view.setEtherscanLink(self.status.settings.getCurrentNetworkDetails().etherscanLink)
self.status.events.on(SignalType.Wallet.event) do(e:Args):