Skip to content

Commit

Permalink
fix: resolves #2731
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom committed Sep 17, 2024
1 parent ae4fa67 commit b509c6e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/pretty-glasses-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

Fixed \`mnemonicToAccount\` options type.
4 changes: 2 additions & 2 deletions src/accounts/mnemonicToAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
type HDKeyToAccountOptions,
hdKeyToAccount,
} from './hdKeyToAccount.js'
import type { HDAccount, HDOptions } from './types.js'
import type { HDAccount } from './types.js'

export type MnemonicToAccountOptions = HDKeyToAccountOptions

Expand All @@ -20,7 +20,7 @@ export type MnemonicToAccountErrorType = HDKeyToAccountErrorType | ErrorType
*/
export function mnemonicToAccount(
mnemonic: string,
opts: HDOptions = {},
opts: MnemonicToAccountOptions = {},
): HDAccount {
const seed = mnemonicToSeedSync(mnemonic)
return hdKeyToAccount(HDKey.fromMasterSeed(seed), opts)
Expand Down

0 comments on commit b509c6e

Please sign in to comment.