Commit c6ccd87c authored by Dev Ojha's avatar Dev Ojha
Browse files

Fix conflict

parent 4df5c874
Showing with 160 additions and 24 deletions
+160 -24
......@@ -17,15 +17,9 @@ require (
github.com/mattn/go-sqlite3 v1.14.16
github.com/ory/dockertest/v3 v3.9.1
github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3
<<<<<<< HEAD
github.com/osmosis-labs/osmosis/osmomath v0.0.0-20230106133904-bf95f2df4908
github.com/osmosis-labs/osmosis/osmoutils v0.0.0-20230106095152-4f77cc5e42af
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.0-20230106110415-61e4300ada92
=======
github.com/osmosis-labs/osmosis/osmomath v0.0.0-20230105100058-2ad8dafc6e4f
github.com/osmosis-labs/osmosis/osmoutils v0.0.0-20230105100058-2ad8dafc6e4f
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.0-20230105100058-2ad8dafc6e4f
>>>>>>> 6436e520 (Add sender to wasm hooks (#3879))
github.com/pkg/errors v0.9.1
github.com/rakyll/statik v0.1.7
github.com/spf13/cast v1.5.0
......
This diff is collapsed.
......@@ -8,11 +8,7 @@ require (
github.com/cosmos/ibc-go/v4 v4.2.0
github.com/gorilla/mux v1.8.0
github.com/grpc-ecosystem/grpc-gateway v1.16.0
<<<<<<< HEAD
github.com/osmosis-labs/osmosis/osmoutils v0.0.0-20230106095152-4f77cc5e42af
=======
github.com/osmosis-labs/osmosis/osmoutils v0.0.0-20230105100058-2ad8dafc6e4f
>>>>>>> 6436e520 (Add sender to wasm hooks (#3879))
github.com/spf13/cobra v1.6.1
github.com/tendermint/tendermint v0.34.24
)
......
......@@ -3,10 +3,12 @@ package ibc_hooks
import (
"encoding/json"
"fmt"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
"github.com/cosmos/cosmos-sdk/types/address"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"
"github.com/osmosis-labs/osmosis/x/ibc-hooks/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
......@@ -73,17 +75,13 @@ func (h WasmHooks) OnRecvPacketOverride(im IBCMiddleware, ctx sdk.Context, packe
sender := sdk.AccAddress(senderHash32[:])
senderBech32, err := sdk.Bech32ifyAddressBytes(h.bech32PrefixAccAddr, sender)
if err != nil {
return osmoutils.NewStringErrorAcknowledgement(fmt.Sprintf("cannot convert sender address %s to bech32: %s", senderStr, err.Error()))
return osmoutils.NewEmitErrorAcknowledgement(ctx, types.ErrBadSender, fmt.Sprintf("cannot convert sender address %s to bech32: %s", sender, err.Error()))
}
// The funds sent on this packet need to be transferred to the intermediary account for the sender.
// For this, we override the ICS20 packet's Receiver (essentially hijacking the funds to this new address)
// and execute the underlying OnRecvPacket() call (which should eventually land on the transfer app's
<<<<<<< HEAD
// relay.go and send the funds to the module.
=======
// relay.go and send the sunds to the intermediary account.
>>>>>>> 6436e520 (Add sender to wasm hooks (#3879))
// relay.go and send the funds to the intermediary account.
//
// If that succeeds, we make the contract call
data.Receiver = senderBech32
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment