refactor: unify the error handling methods in the crypto package that are different from the project style

Signed-off-by: ChengenH <hce19970702@gmail.com>
This commit is contained in:
ChengenH 2024-12-13 19:55:31 +08:00
parent d41590a78c
commit daad49051e

View file

@ -923,7 +923,7 @@ func testExternalUI(api *core.SignerAPI) {
}
}
expectApprove := func(testcase string, err error) {
if errors.Is(err, accounts.ErrUnknownAccount) {
if err == nil || errors.Is(err, accounts.ErrUnknownAccount) {
return
}
addErr(fmt.Sprintf("%v: expected no error, got %v", testcase, err.Error()))