This commit is contained in:
Jim McDonald
2023-06-05 20:41:04 +01:00
parent 2880ec9bdd
commit 7d723148ab
6 changed files with 6 additions and 5 deletions

View File

@@ -252,7 +252,7 @@ func accountFromMnemonicAndPath(mnemonic string, path string) (e2wtypes.Account,
}
// Ensure the path is valid.
match := hdPathRegex.Match([]byte(path))
match := hdPathRegex.MatchString(path)
if !match {
return nil, errors.New("path does not match expected format m/…")
}

View File

@@ -196,7 +196,7 @@ func WalletAndAccountsFromPath(ctx context.Context, path string) (e2wtypes.Walle
accounts := make([]e2wtypes.Account, 0)
for account := range wallet.Accounts(ctx) {
if re.Match([]byte(account.Name())) {
if re.MatchString(account.Name()) {
accounts = append(accounts, account)
}
}