You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: make transfer module v2 use same core paths as v1 (#7754)
* reuse transfer keeper in v2
* remove keeper from transfer module v2
* moved some comments around and disabled forwarding
* code review fixes
* Update modules/apps/transfer/keeper/relay_test.go
---------
Co-authored-by: Aditya <[email protected]>
returnnil, errorsmod.Wrapf(ibcerrors.ErrInvalidRequest, "application version not found for source port: %s and source channel: %s", msg.SourcePort, msg.SourceChannel)
36
45
}
37
46
38
-
ifmsg.Forwarding.GetUnwind() {
39
-
msg, err=k.unwindHops(ctx, msg)
47
+
coins:=msg.GetCoins()
48
+
hops:=msg.Forwarding.GetHops()
49
+
ifappVersion==types.V1 {
50
+
// ics20-1 only supports a single coin, so if that is the current version, we must only process a single coin.
51
+
iflen(coins) >1 {
52
+
returnnil, errorsmod.Wrapf(ibcerrors.ErrInvalidRequest, "cannot transfer multiple coins with %s", types.V1)
53
+
}
54
+
55
+
// ics20-1 does not support forwarding, so if that is the current version, we must reject the transfer.
56
+
iflen(hops) >0 {
57
+
returnnil, errorsmod.Wrapf(ibcerrors.ErrInvalidRequest, "cannot forward coins with %s", types.V1)
0 commit comments