Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(amino/json): use AminoMarshaler reprType info
When checking if `info.IsJSONAnyValueType`, if this type is a AminoMarshaler, then also check `info.ReprType.IsJSONAnyValueType`. This prevents a panics that happens during the sanity check phase of `encodeReflectJSONInterface()` when the type `ConcreteInfo` doesn't match the JSON structure. For instance, before that fix, that used to happen with `BigintValue` which is a struct (so expected JSON is `{...}` and `IsJSONAnyValueType=false`), but is marshaled into a simple string (so expected JSON is only `"..."`, and `ReprType.IsJSONAnyValueType=true`).
- Loading branch information