@@ -1088,15 +1088,6 @@ func (suite *KeeperTestSuite) TestPacketForwardsCompatibility() {
10881088 expError error
10891089 expAckError error
10901090 }{
1091- {
1092- "success: new field v2" ,
1093- func () {
1094- jsonString := fmt .Sprintf (`{"tokens":[{"denom": {"base": "atom", "trace": []},"amount":"100"}],"sender":"%s","receiver":"%s", "new_field":"value"}` , suite .chainB .SenderAccount .GetAddress ().String (), suite .chainA .SenderAccount .GetAddress ().String ())
1095- packetData = []byte (jsonString )
1096- },
1097- nil ,
1098- nil ,
1099- },
11001091 {
11011092 "success: no new field with memo v2" ,
11021093 func () {
@@ -1124,24 +1115,22 @@ func (suite *KeeperTestSuite) TestPacketForwardsCompatibility() {
11241115 ibcerrors .ErrInvalidType ,
11251116 },
11261117 {
1127- "failure: missing field v2" ,
1118+ "failure: new field v2" ,
11281119 func () {
1129- jsonString := fmt .Sprintf (`{"tokens":[{"denom": {"trace": []},"amount":"100"}],"sender":"%s","receiver":"%s"}` , suite .chainB .SenderAccount .GetAddress ().String (), suite .chainA .SenderAccount .GetAddress ().String ())
1120+ jsonString := fmt .Sprintf (`{"tokens":[{"denom": {"base": "atom", " trace": []},"amount":"100"}],"sender":"%s","receiver":"%s", "new_field":"value "}` , suite .chainB .SenderAccount .GetAddress ().String (), suite .chainA .SenderAccount .GetAddress ().String ())
11301121 packetData = []byte (jsonString )
11311122 },
1132- types . ErrInvalidDenomForTransfer ,
1123+ ibcerrors . ErrInvalidType ,
11331124 ibcerrors .ErrInvalidType ,
11341125 },
11351126 {
1136- "success: new field" ,
1127+ "failure: missing field v2 " ,
11371128 func () {
1138- path .EndpointA .ChannelConfig .Version = types .V1
1139- path .EndpointB .ChannelConfig .Version = types .V1
1140- jsonString := fmt .Sprintf (`{"denom":"denom","amount":"100","sender":"%s","receiver":"%s","memo":"memo","new_field":"value"}` , suite .chainB .SenderAccount .GetAddress ().String (), suite .chainA .SenderAccount .GetAddress ().String ())
1129+ jsonString := fmt .Sprintf (`{"tokens":[{"denom": {"trace": []},"amount":"100"}],"sender":"%s","receiver":"%s"}` , suite .chainB .SenderAccount .GetAddress ().String (), suite .chainA .SenderAccount .GetAddress ().String ())
11411130 packetData = []byte (jsonString )
11421131 },
1143- nil ,
1144- nil ,
1132+ types . ErrInvalidDenomForTransfer ,
1133+ ibcerrors . ErrInvalidType ,
11451134 },
11461135 {
11471136 "success: no new field with memo" ,
@@ -1175,6 +1164,17 @@ func (suite *KeeperTestSuite) TestPacketForwardsCompatibility() {
11751164 ibcerrors .ErrInvalidType ,
11761165 ibcerrors .ErrInvalidType ,
11771166 },
1167+ {
1168+ "failure: new field" ,
1169+ func () {
1170+ path .EndpointA .ChannelConfig .Version = types .V1
1171+ path .EndpointB .ChannelConfig .Version = types .V1
1172+ jsonString := fmt .Sprintf (`{"denom":"denom","amount":"100","sender":"%s","receiver":"%s","memo":"memo","new_field":"value"}` , suite .chainB .SenderAccount .GetAddress ().String (), suite .chainA .SenderAccount .GetAddress ().String ())
1173+ packetData = []byte (jsonString )
1174+ },
1175+ ibcerrors .ErrInvalidType ,
1176+ ibcerrors .ErrInvalidType ,
1177+ },
11781178 {
11791179 "failure: missing field" ,
11801180 func () {
0 commit comments