Skip to content

Commit

Permalink
fix error message
Browse files Browse the repository at this point in the history
  • Loading branch information
fbsobreira committed May 3, 2020
1 parent 3ef1f98 commit e70f5f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions pkg/account/creation.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
package account

import (
"errors"

"github.com/fbsobreira/gotron-sdk/pkg/keys"
"github.com/fbsobreira/gotron-sdk/pkg/mnemonic"
"github.com/fbsobreira/gotron-sdk/pkg/store"
)

var (
AccountByNameExists = errors.New("name chosen for account already exists")
)

// Creation struct for account
type Creation struct {
Name string
Passphrase string
Expand Down
2 changes: 1 addition & 1 deletion pkg/account/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func ImportKeyStore(keyPath, name, passphrase string) (string, error) {

hasAddress := store.FromAddress(key.Address.String()) != nil
if hasAddress {
return "", fmt.Errorf("address %s already exists in keystore", key.Address.String)
return "", fmt.Errorf("address %s already exists in keystore", key.Address.String())
}
uDir, _ := homedir.Dir()
newPath := filepath.Join(uDir, common.DefaultConfigDirName, common.DefaultConfigAccountAliasesDirName, name, filepath.Base(keyPath))
Expand Down

0 comments on commit e70f5f6

Please sign in to comment.