refactor!: turn MsgsV2 into ReflectMessages to make it less confusing (#19839)

Co-authored-by: marbar3778 <marbar3778@yahoo.com>
Co-authored-by: sontrinh16 <trinhleson2000@gmail.com>
Co-authored-by: Marko <marko@baricevic.me>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Aaron Craelius
2024-05-16 09:55:08 +00:00
committed by GitHub
co-authored by marbar3778 sontrinh16 Marko coderabbitai[bot]
parent 2c3fd19099
commit 53925ef5fd
18 changed files with 90 additions and 73 deletions
+3 -3
View File
@@ -4,7 +4,7 @@ import (
"bytes"
"fmt"
protov2 "google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protoreflect"
bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1"
errorsmod "cosmossdk.io/errors"
@@ -103,8 +103,8 @@ func (msg *KVStoreTx) GetMsgs() []sdk.Msg {
return []sdk.Msg{msg}
}
func (msg *KVStoreTx) GetMsgsV2() ([]protov2.Message, error) {
return []protov2.Message{&bankv1beta1.MsgSend{FromAddress: msg.address.String()}}, nil // this is a hack for tests
func (msg *KVStoreTx) GetReflectMessages() ([]protoreflect.Message, error) {
return []protoreflect.Message{(&bankv1beta1.MsgSend{FromAddress: msg.address.String()}).ProtoReflect()}, nil // this is a hack for tests
}
func (msg *KVStoreTx) GetSignBytes() []byte {