-
-
Notifications
You must be signed in to change notification settings - Fork 50
patch serialize and _initFromMnemonic to account for instances where mnemonic could be buffer array or string #59
Conversation
…mnemonic could be buffer array or string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for bringing this over. I think we'd want to update the unit tests before merging this.
54d6174
to
c4b81f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. The tests could be improved to be more precise, but that's not your fault — I think we can fix that later when we convert them to Jest.
index.js
Outdated
* BIP39-compliant mnemonic. | ||
* | ||
* @param {string|Array<number>|Buffer} mnemonic - A seed phrase represented | ||
* as a string, an array of UTF-8 bytes, or a Buffer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe worth emphasizing here that the array and Buffer types are assumed to be NFKD-normalized: https://github.com/MetaMask/bip39/blob/master/ts_src/index.ts#L72-L73
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment added here: 446ba4b
The |
c4b81f8
to
446ba4b
Compare
done here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Adds patch of this package currently implemented extension side to this repo.