Return error when using unsupported mnemonic language (#11805)

* Return error when using unsupported mnemonic language

* Fix failing tests

* More test fixes

* Add MnemonicLanguage to CreateWalletRequest

* Add MnemonicLanguage to remaining tests

* Add language to error

* Add missing (.)

* Set default language + fix renumbered fields

* Replace hardcoded language with default var

* default set

* gaz

* fix proto field setting

* fix up

* Remove WithMnemonicLanguage from tests

* Remove WithMnemonicLanguage from tests

* Fix conflicting information failure

* Gazelle + remove hardcoded english values

* fix

* Fix tests

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
Sammy Rosso
2023-01-27 00:44:38 +01:00
committed by GitHub
parent 56907bb2c6
commit 9136d30121
14 changed files with 501 additions and 458 deletions

View File

@@ -345,7 +345,7 @@ func TestWaitForActivation_AccountsChanged(t *testing.T) {
ListenForChanges: true,
})
require.NoError(t, err)
err = km.RecoverAccountsFromMnemonic(ctx, constant.TestMnemonic, "", "", 1)
err = km.RecoverAccountsFromMnemonic(ctx, constant.TestMnemonic, derived.DefaultMnemonicLanguage, "", 1)
require.NoError(t, err)
validatorClient := mock.NewMockValidatorClient(ctrl)
beaconClient := mock.NewMockBeaconChainClient(ctrl)
@@ -390,7 +390,7 @@ func TestWaitForActivation_AccountsChanged(t *testing.T) {
go func() {
// We add the active key into the keymanager and simulate a key refresh.
time.Sleep(time.Second * 1)
err = km.RecoverAccountsFromMnemonic(ctx, constant.TestMnemonic, "", "", 2)
err = km.RecoverAccountsFromMnemonic(ctx, constant.TestMnemonic, derived.DefaultMnemonicLanguage, "", 2)
require.NoError(t, err)
channel <- [][fieldparams.BLSPubkeyLength]byte{}
}()