Skip to content

Commit a1b6bb2

Browse files
committed
simplify
1 parent 333e272 commit a1b6bb2

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

accounts/keys.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -349,16 +349,11 @@ func (f *EnvKey) PrivateKey() (*crypto.PrivateKey, error) {
349349
}
350350

351351
func (f *EnvKey) ToConfig() config.AccountKey {
352-
pk, err := f.PrivateKey()
353-
if err != nil {
354-
panic(err)
355-
}
356-
357352
return config.AccountKey{
358353
Type: config.KeyTypeHex,
359354
SigAlgo: f.sigAlgo,
360355
HashAlgo: f.hashAlgo,
361-
PrivateKey: *pk,
356+
PrivateKey: f.privateKey,
362357
Env: f.env,
363358
}
364359
}

0 commit comments

Comments
 (0)