Skip to content

SDK NewMnemonic Passphrase Issue #8635

Closed

Description

Summary of Bug

Issue with the account that is created using NewMnemonic. NewMnemonic does not require a passphrase argument and the passphrase passed to NewAccount inside the method is set to DefaultBIP39Passphrase. The issue that this causes is that the passphrase is now set automatically to an empty string ("") and it cannot be changed. If we decide the use the mnemonic that is outputted by the NewMnemonic method into NewAccount, this causes two accounts to be created, where the first one would have the empty string as the passphrase and the second account will have the passphrase set.

Proposed Solution:
Remove the NewAccount method inside NewMnemonic and have the NewMnemonic method only output the bip39 mnemonic and err (nil if none). Then that mnemonic can be used inside NewAccount - which can be left the way it is.

Would like to discuss here before opening any PRs. Thanks guys

Version

v0.41.3

Steps to Reproduce


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions