Skip to content

Commit

Permalink
remove mnemonic getter
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelmota committed Jul 8, 2018
1 parent 4d39b15 commit 489b6d4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
8 changes: 0 additions & 8 deletions hdwallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,6 @@ func (w *Wallet) SignTxWithPassphrase(account accounts.Account, passphrase strin
return w.SignTx(account, tx, chainID)
}

// Mnemonic returns the wallet's mnemonic, if using a mnemonic as a seed.
func (w *Wallet) Mnemonic() (string, error) {
if w.mnemonic == "" {
return "", errors.New("this wallet is not using a mnemonic")
}
return w.mnemonic, nil
}

// PrivateKey returns the ECDSA private key of the account.
func (w *Wallet) PrivateKey(account accounts.Account) (*ecdsa.PrivateKey, error) {
path, err := ParseDerivationPath(account.URL.Path)
Expand Down
9 changes: 0 additions & 9 deletions hdwallet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@ func TestWallet(t *testing.T) {
t.Error(err)
}

walletmnemonic, err := wallet.Mnemonic()
if err != nil {
t.Error(err)
}

if walletmnemonic != mnemonic {
t.Error("wrong mnemonic")
}

path, err := ParseDerivationPath("m/44'/60'/0'/0/0")
if err != nil {
t.Error(err)
Expand Down

0 comments on commit 489b6d4

Please sign in to comment.