Skip to content

Commit

Permalink
Fix missing type URL after calling NewAnyWithValue
Browse files Browse the repository at this point in the history
  • Loading branch information
pharr117 committed Aug 14, 2024
1 parent d5dc546 commit ea54097
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions client/codec/types/interface_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,16 @@ func (registry *ProbeInterfaceRegistry) UnpackAny(any *cosmosCodecTypes.Any, ifa
return err
}

var typeURL string
// WARN: Is this the proper way to handle this? The custom message implementations are not returning a TypeURL in the Any after calling proto.MessageName
if newAny.TypeUrl == "/" {
typeURL = any.TypeUrl
} else {
typeURL = newAny.TypeUrl
}

*any = *newAny
any.TypeUrl = typeURL

return nil
}
Expand Down

0 comments on commit ea54097

Please sign in to comment.