chore(tx): fix staticcheck issues (#15150)
This commit is contained in:
parent
b53be683b6
commit
21d479c4ef
@ -59,6 +59,7 @@ func TestAminoJSON_EdgeCases(t *testing.T) {
|
||||
require.Equal(t, string(legacyBz), string(bz))
|
||||
|
||||
goProtoJSON, err := protojson.Marshal(tc.msg)
|
||||
assert.NilError(t, err)
|
||||
err = cdc.UnmarshalJSON(bz, msg2)
|
||||
assert.NilError(t, err, "unmarshal failed: %s vs %s", legacyBz, goProtoJSON)
|
||||
})
|
||||
|
||||
@ -54,7 +54,7 @@ func BenchmarkDecimalValueRendererFormat(b *testing.B) {
|
||||
b.ReportAllocs()
|
||||
|
||||
for i := 0; i < b.N; i++ {
|
||||
for _, value := range intValues {
|
||||
for _, value := range decimalValues {
|
||||
if _, err := dvr.Format(ctx, value); err != nil {
|
||||
b.Fatal(err)
|
||||
}
|
||||
|
||||
@ -16,9 +16,13 @@ import (
|
||||
"cosmossdk.io/x/tx/textual"
|
||||
)
|
||||
|
||||
// Dedicated type for context Values, to avoid conflicts,
|
||||
// per the (context.Context).WithValue docs.
|
||||
type mockCoinMetadata string
|
||||
|
||||
// mockCoinMetadataKey is used in the mock coin metadata querier.
|
||||
func mockCoinMetadataKey(denom string) string {
|
||||
return fmt.Sprintf("%s-%s", "coin-metadata", denom)
|
||||
func mockCoinMetadataKey(denom string) mockCoinMetadata {
|
||||
return mockCoinMetadata(fmt.Sprintf("%s-%s", "coin-metadata", denom))
|
||||
}
|
||||
|
||||
// mockCoinMetadataQuerier is a mock querier for coin metadata used for test
|
||||
|
||||
@ -54,7 +54,7 @@ func (mr *messageValueRenderer) Format(ctx context.Context, v protoreflect.Value
|
||||
return nil, err
|
||||
}
|
||||
|
||||
subscreens := make([]Screen, 0)
|
||||
var subscreens []Screen
|
||||
if fd.IsList() {
|
||||
if r, ok := vr.(RepeatedValueRenderer); ok {
|
||||
// If the field is a list, and handles its own repeated rendering
|
||||
|
||||
Loading…
Reference in New Issue
Block a user