[#562] config/node: fallback to wallet if raw key is invalid

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
remotes/fyrchik/meta-pebble
Evgenii Stratonikov 2021-06-04 14:02:22 +03:00 committed by Alex Vanin
parent 2f020a500d
commit 41a30d6ec2
2 changed files with 2 additions and 2 deletions

View File

@ -208,7 +208,7 @@ func initCfg(path string) *cfg {
config.WithConfigFile(path),
)
key := nodeconfig.Wallet(appCfg)
key := nodeconfig.Key(appCfg)
var logPrm logger.Prm

View File

@ -43,7 +43,7 @@ func Key(c *config.Config) *keys.PrivateKey {
}
if err != nil {
panic(fmt.Errorf("can't read key: %w", err))
return Wallet(c)
}
return key