Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dang/add test pfm reverse #136

Merged
merged 4 commits into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ replace (
// ibc-go with wasm client
github.com/cosmos/ibc-go/v7 => github.com/strangelove-ventures/ibc-go/v7 v7.0.0-20230410223156-8c202c556f82

github.com/strangelove-ventures/packet-forward-middleware/v7 => github.com/notional-labs/packet-forward-middleware/v7 v7.0.0-20230517054520-e1958ca2830e
github.com/strangelove-ventures/packet-forward-middleware/v7 => github.com/notional-labs/packet-forward-middleware/v7 v7.0.0-20230526180458-68520c6b500d

github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -755,8 +755,8 @@ github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi
github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/notional-labs/packet-forward-middleware/v7 v7.0.0-20230517054520-e1958ca2830e h1:VnV20PYZsHoApnSNdxgM9E8f3Xxsk8yx8lL7WZZs1Ls=
github.com/notional-labs/packet-forward-middleware/v7 v7.0.0-20230517054520-e1958ca2830e/go.mod h1:ZqzpgUUK75BHIttNMs2ANFUNGEmi+aFij6gYmiDjdqc=
github.com/notional-labs/packet-forward-middleware/v7 v7.0.0-20230526180458-68520c6b500d h1:1O+4lgWVLMXaXPmn5hYBpf4dFansC80mnSeS4KhZWrc=
github.com/notional-labs/packet-forward-middleware/v7 v7.0.0-20230526180458-68520c6b500d/go.mod h1:ZqzpgUUK75BHIttNMs2ANFUNGEmi+aFij6gYmiDjdqc=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs=
Expand Down
3 changes: 2 additions & 1 deletion x/transfermiddleware/keeper/ics4wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func (keeper Keeper) SendPacket(
if err != nil {
return 0, err
}

// check if denom in fungibleTokenPacketData is native denom in parachain info and
parachainInfo := keeper.GetParachainIBCTokenInfo(ctx, fungibleTokenPacketData.Denom)

Expand Down Expand Up @@ -173,14 +174,14 @@ func (keeper Keeper) refundToken(ctx sdk.Context, packet channeltypes.Packet, da
if err != nil {
return err
}

if transfertypes.SenderChainIsSource(packet.GetSourcePort(), packet.GetSourceChannel(), data.Denom) {
// Do nothing
// This case should never happened
return nil
}
nativeDenom := keeper.GetNativeDenomByIBCDenomSecondaryIndex(ctx, trace.IBCDenom())
paraTokenInfo := keeper.GetParachainIBCTokenInfo(ctx, nativeDenom)

// only trigger if source channel is from parachain.
if !keeper.hasParachainIBCTokenInfo(ctx, nativeDenom) {
return nil
Expand Down
Loading
Loading