diff --git a/core/services/keystore/keys/tronkey/account_test.go b/core/services/keystore/keys/tronkey/account_test.go index 6047830a717..9a92801bb13 100644 --- a/core/services/keystore/keys/tronkey/account_test.go +++ b/core/services/keystore/keys/tronkey/account_test.go @@ -114,7 +114,7 @@ func TestHexToAddress(t *testing.T) { for _, hexStr := range validHexAddresses { t.Run(hexStr, func(t *testing.T) { addr, err := HexToAddress(hexStr) - require.Nil(t, err) + require.NoError(t, err) require.Equal(t, "0x"+hexStr, addr.Hex()) }) } @@ -131,7 +131,7 @@ func TestHexToAddress(t *testing.T) { for _, hexStr := range invalidHexAddresses { t.Run(hexStr, func(t *testing.T) { _, err := HexToAddress(hexStr) - require.NotNil(t, err) + require.Error(t, err) }) } })