You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constmnemonic="priority road check curious abvious ...";// obvious has a typo = abviousconstkey=awaitmnemonicToWalletKey(mnemonic.split(" "));constwallet=WalletContractV4.create({publicKey: key.publicKey,workchain: 0});
They both pass smoothly and return different wallet addresses.
This is very dangerous. Consider that somebody has a mnemonic and the code that creates a wallet in software has a typo. He would end up reaching a different address by mistake. Send it funds. If this code is ever deleted and they try to recover the wallet from the written mnemonic, they will not make the same typo again, and the money will be lost.
Wanted behavior - Throw an error from mnemonicToWalletKey on any problem with the mnemonic (not enough words, too many words, words not in the dictionary, checksum of mnemonic doesn't add up).
The text was updated successfully, but these errors were encountered:
Consider these two snippets:
They both pass smoothly and return different wallet addresses.
This is very dangerous. Consider that somebody has a mnemonic and the code that creates a wallet in software has a typo. He would end up reaching a different address by mistake. Send it funds. If this code is ever deleted and they try to recover the wallet from the written mnemonic, they will not make the same typo again, and the money will be lost.
Wanted behavior - Throw an error from
mnemonicToWalletKey
on any problem with the mnemonic (not enough words, too many words, words not in the dictionary, checksum of mnemonic doesn't add up).The text was updated successfully, but these errors were encountered: