-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(client/v2): fix marshalling of queries with any (#18309)
(cherry picked from commit 2caf00d) # Conflicts: # client/debug/main.go # client/v2/autocli/app.go # client/v2/go.mod # x/tx/CHANGELOG.md # x/tx/signing/aminojson/json_marshal.go
- Loading branch information
1 parent
f6d4b2e
commit 4f62b60
Showing
9 changed files
with
192 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package aminojson | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
|
||
"cosmossdk.io/x/tx/signing/aminojson/internal/testpb" | ||
) | ||
|
||
func Test_getMessageAminoName(t *testing.T) { | ||
msg := &testpb.ABitOfEverything{} | ||
name, ok := getMessageAminoName(msg.ProtoReflect()) | ||
require.True(t, ok) | ||
require.Equal(t, "ABitOfEverything", name) | ||
|
||
secondMsg := &testpb.Duration{} | ||
_, ok = getMessageAminoName(secondMsg.ProtoReflect()) | ||
require.False(t, ok) | ||
} | ||
|
||
func Test_getMessageAminoNameAny(t *testing.T) { | ||
msg := &testpb.ABitOfEverything{} | ||
name := getMessageAminoNameAny(msg.ProtoReflect()) | ||
require.Equal(t, "ABitOfEverything", name) | ||
|
||
secondMsg := &testpb.Duration{} | ||
name = getMessageAminoNameAny(secondMsg.ProtoReflect()) | ||
require.Equal(t, "/testpb.Duration", name) | ||
} |