Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
ledger-signer: Don't try to split cfgStr if none is specified
Browse files Browse the repository at this point in the history
This should give a better error message when the user didn't specify a
valid signer configuration, i.e. it will return "address not configured"
instead of "malformed k/v pair: ''".
  • Loading branch information
tjanez committed Jul 31, 2020
1 parent 38ee537 commit 3f76f58
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ledger-signer/ledger_signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ type pluginConfig struct {
}

func newPluginConfig(cfgStr string) (*pluginConfig, error) {
kvStrs := strings.Split(cfgStr, ";")
var kvStrs []string

// Don't try to split cfgStr if no configuration is specified.
if cfgStr != "" {
kvStrs = strings.Split(cfgStr, ";")
}

var (
cfg pluginConfig
Expand Down

0 comments on commit 3f76f58

Please sign in to comment.