Skip to content

Commit

Permalink
chore: rename GetWalletPath() to CheckWalletExists()
Browse files Browse the repository at this point in the history
  • Loading branch information
randomshinichi committed Nov 19, 2019
1 parent 6f37c3b commit ec08cb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions account/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func StoreToKeyStoreFile(account *Account, password, walletName string) (filePat
// LoadFromKeyStoreFile loads an encrypted Account from a JSON file
func LoadFromKeyStoreFile(keyFile, password string) (account *Account, err error) {
// find out the real path of the wallet
filePath, err := GetWalletPath(keyFile)
filePath, err := CheckWalletExists(keyFile)
if err != nil {
return
}
Expand All @@ -114,8 +114,8 @@ func LoadFromKeyStoreFile(keyFile, password string) (account *Account, err error
return
}

// GetWalletPath checks if a file exists at the specified path.
func GetWalletPath(path string) (walletPath string, err error) {
// CheckWalletExists checks if a file exists at the specified path.
func CheckWalletExists(path string) (walletPath string, err error) {
// if file exists then load the file
if _, err = os.Stat(path); !os.IsNotExist(err) {
walletPath = path
Expand Down

0 comments on commit ec08cb9

Please sign in to comment.