Skip to content

Commit

Permalink
refactor: removed unused accounts() from interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Yashk767 committed Mar 27, 2024
1 parent 2a20886 commit 95d4a58
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
7 changes: 0 additions & 7 deletions accounts/accountUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,12 @@ type AccountInterface interface {
CreateAccount(path string, password string) accounts.Account
GetPrivateKey(address string, password string, keystorePath string) (*ecdsa.PrivateKey, error)
SignData(hash []byte, account types.Account, defaultPath string) ([]byte, error)
Accounts(path string) []accounts.Account
NewAccount(path string, passphrase string) (accounts.Account, error)
Sign(digestHash []byte, prv *ecdsa.PrivateKey) ([]byte, error)
}

type AccountUtils struct{}

//This function returns all the accounts in form of array
func (accountUtils AccountUtils) Accounts(path string) []accounts.Account {
ks := keystore.NewKeyStore(path, keystore.StandardScryptN, keystore.StandardScryptP)
return ks.Accounts()
}

//This function takes path and pass phrase as input and returns the new account
func (accountUtils AccountUtils) NewAccount(path string, passphrase string) (accounts.Account, error) {
ks := keystore.NewKeyStore(path, keystore.StandardScryptN, keystore.StandardScryptP)
Expand Down
16 changes: 0 additions & 16 deletions accounts/mocks/account_interface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 95d4a58

Please sign in to comment.