Skip to content

Commit

Permalink
fix: remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
fx0x55 committed Dec 19, 2022
1 parent 6bc0c4b commit 5a57daa
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 71 deletions.
13 changes: 7 additions & 6 deletions x/ibc/applications/transfer/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package keeper

import (
ibctransferkeeper "github.com/cosmos/ibc-go/v3/modules/apps/transfer/keeper"
transfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
porttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types"
"github.com/tendermint/tendermint/libs/log"

Expand All @@ -22,18 +23,18 @@ type Keeper struct {
paramSpace paramtypes.Subspace

ics4Wrapper porttypes.ICS4Wrapper
channelKeeper types.ChannelKeeper
portKeeper types.PortKeeper
authKeeper types.AccountKeeper
bankKeeper types.BankKeeper
channelKeeper transfertypes.ChannelKeeper
portKeeper transfertypes.PortKeeper
authKeeper transfertypes.AccountKeeper
bankKeeper transfertypes.BankKeeper
scopedKeeper capabilitykeeper.ScopedKeeper
}

// NewKeeper creates a new IBC transfer Keeper instance
func NewKeeper(keeper ibctransferkeeper.Keeper,
cdc codec.BinaryCodec, key sdk.StoreKey, paramSpace paramtypes.Subspace,
ics4Wrapper porttypes.ICS4Wrapper, channelKeeper types.ChannelKeeper, portKeeper types.PortKeeper,
authKeeper types.AccountKeeper, bankKeeper types.BankKeeper, scopedKeeper capabilitykeeper.ScopedKeeper,
ics4Wrapper porttypes.ICS4Wrapper, channelKeeper transfertypes.ChannelKeeper, portKeeper transfertypes.PortKeeper,
authKeeper transfertypes.AccountKeeper, bankKeeper transfertypes.BankKeeper, scopedKeeper capabilitykeeper.ScopedKeeper,
) Keeper {
// ensure ibc transfer module account is set
if addr := authKeeper.GetModuleAddress(types.ModuleName); addr == nil {
Expand Down
5 changes: 2 additions & 3 deletions x/ibc/applications/transfer/keeper/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func parseIBCCoinDenom(packet channeltypes.Packet, packetDenom string) string {
}
receiveDenom = denom
} else {
// sender chain is the source, mint vouchers
// sender chain is the source

// since SendPacket did not prefix the denomination, we must prefix denomination here
sourcePrefix := transfertypes.GetDenomPrefix(packet.GetDestPort(), packet.GetDestChannel())
Expand All @@ -48,8 +48,7 @@ func parseIBCCoinDenom(packet channeltypes.Packet, packetDenom string) string {
// construct the denomination trace from the full raw denomination
denomTrace := transfertypes.ParseDenomTrace(prefixedDenom)

voucherDenom := denomTrace.IBCDenom()
receiveDenom = voucherDenom
receiveDenom = denomTrace.IBCDenom()
}
return receiveDenom
}
Expand Down
5 changes: 0 additions & 5 deletions x/ibc/applications/transfer/types/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,5 @@ package types
// IBC transfer events
const (
EventTypeReceive = "ibc_receive"
EventTypeReceiveRoute = "ibc_receive_route"
AttributeKeyRecvError = "error"

AttributeKeyRouteSuccess = "success"
AttributeKeyRoute = "route"
AttributeKeyRouteError = "error"
)
57 changes: 0 additions & 57 deletions x/ibc/applications/transfer/types/expected_keepers.go

This file was deleted.

0 comments on commit 5a57daa

Please sign in to comment.