Skip to content

Commit ac4fe2d

Browse files
ahadda5rauljordanprestonvanloon
authored
Czech language support from go-bip39 incorporated (#8861)
* added Czech from go-bip39 * go mod tidy Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
1 parent 2f66d1a commit ac4fe2d

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

deps.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3047,8 +3047,8 @@ def prysm_deps():
30473047
go_repository(
30483048
name = "com_github_tyler_smith_go_bip39",
30493049
importpath = "github.com/tyler-smith/go-bip39",
3050-
sum = "h1:+t3w+KwLXO6154GNJY+qUtIxLTmFjfUmpguQT1OlOT8=",
3051-
version = "v1.0.2",
3050+
sum = "h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8=",
3051+
version = "v1.1.0",
30523052
)
30533053

30543054
go_repository(

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ require (
9797
github.com/stretchr/testify v1.7.0
9898
github.com/supranational/blst v0.3.4
9999
github.com/trailofbits/go-mutexasserts v0.0.0-20200708152505-19999e7d3cef
100-
github.com/tyler-smith/go-bip39 v1.0.2
100+
github.com/tyler-smith/go-bip39 v1.1.0
101101
github.com/urfave/cli/v2 v2.3.0
102102
github.com/wealdtech/go-eth2-util v1.6.3
103103
github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4 v1.1.3

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,8 +1181,8 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1
11811181
github.com/trailofbits/go-mutexasserts v0.0.0-20200708152505-19999e7d3cef h1:8LRP+2JK8piIUU16ZDgWDXwjJcuJNTtCzadjTZj8Jf0=
11821182
github.com/trailofbits/go-mutexasserts v0.0.0-20200708152505-19999e7d3cef/go.mod h1:+SV/613m53DNAmlXPTWGZhIyt4E/qDvn9g/lOPRiy0A=
11831183
github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs=
1184-
github.com/tyler-smith/go-bip39 v1.0.2 h1:+t3w+KwLXO6154GNJY+qUtIxLTmFjfUmpguQT1OlOT8=
1185-
github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs=
1184+
github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8=
1185+
github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U=
11861186
github.com/uber/jaeger-client-go v2.25.0+incompatible h1:IxcNZ7WRY1Y3G4poYlx24szfsn/3LvK9QHCq9oQw8+U=
11871187
github.com/uber/jaeger-client-go v2.25.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
11881188
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=

validator/accounts/wallet_recover.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,14 @@ func inputMnemonic(cliCtx *cli.Context) (mnemonicPhrase string, err error) {
159159
return enteredMnemonic, nil
160160
}
161161
allowedLanguages := map[string][]string{
162-
"english": wordlists.English,
163162
"chinese_simplified": wordlists.ChineseSimplified,
164163
"chinese_traditional": wordlists.ChineseTraditional,
164+
"czech": wordlists.Czech,
165+
"english": wordlists.English,
165166
"french": wordlists.French,
166-
"italian": wordlists.Italian,
167167
"japanese": wordlists.Japanese,
168168
"korean": wordlists.Korean,
169+
"italian": wordlists.Italian,
169170
"spanish": wordlists.Spanish,
170171
}
171172
languages := make([]string, 0)

validator/rpc/wallet.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,14 @@ func (s *Server) RecoverWallet(ctx context.Context, req *pb.RecoverWalletRequest
147147
// Check validate mnemonic with chosen language
148148
language := strings.ToLower(req.Language)
149149
allowedLanguages := map[string][]string{
150-
"english": wordlists.English,
151150
"chinese_simplified": wordlists.ChineseSimplified,
152151
"chinese_traditional": wordlists.ChineseTraditional,
152+
"czech": wordlists.Czech,
153+
"english": wordlists.English,
153154
"french": wordlists.French,
154-
"italian": wordlists.Italian,
155155
"japanese": wordlists.Japanese,
156156
"korean": wordlists.Korean,
157+
"italian": wordlists.Italian,
157158
"spanish": wordlists.Spanish,
158159
}
159160
if _, ok := allowedLanguages[language]; !ok {

0 commit comments

Comments
 (0)