Closed yzhuang closed 1 year ago
It would be a good improvement, indeed. Thanks for the report.
@remyroy Apologies for not getting it fully correct on the first attempt. Here's a second attempt: https://github.com/stake-house/wagyu-key-gen/pull/163
I looked at the code more carefully, and mnemonicArray
is only used for length validation. It is not passed to the next step: props
itself is passed to the next step, so the trimming needs to happen earlier.
Do you mind taking another look?
We ran into an issue today and spend a full hour debugging why the Wagyu Key Gen failed to generate a BLS->0x01 change. It turned out that when pasting in the mnemonic secret phrase, the user had a newline character after the last secret word.
A simple trimming operation can help improve user-friendliness.