Skip to content

Commit

Permalink
fix: remove stale todos
Browse files Browse the repository at this point in the history
  • Loading branch information
Lockwarr committed Nov 11, 2024
1 parent 9f0f46d commit 78c7762
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 47 deletions.
6 changes: 0 additions & 6 deletions x/interchaintxs/keeper/ibc_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ func (k *Keeper) HandleAcknowledgement(ctx sdk.Context, packet channeltypes.Pack
return errors.Wrapf(sdkerrors.ErrJSONMarshal, "failed to marshal Packet/Acknowledgment: %v", err)
}

// TODO remove feekeeper module
// k.feeKeeper.DistributeAcknowledgementFee(ctx, relayer, feetypes.NewPacketID(packet.SourcePort, packet.SourceChannel, packet.Sequence))

// Actually we have only one kind of error returned from acknowledgement
// maybe later we'll retrieve actual errors from events
_, err = k.sudoKeeper.Sudo(ctx, icaOwner.GetContract(), msg)
Expand All @@ -65,9 +62,6 @@ func (k *Keeper) HandleTimeout(ctx sdk.Context, packet channeltypes.Packet, rela
return errors.Wrapf(sdkerrors.ErrJSONMarshal, "failed to marshal Packet: %v", err)
}

// TODO remove feekeeper module
// k.feeKeeper.DistributeTimeoutFee(ctx, relayer, feetypes.NewPacketID(packet.SourcePort, packet.SourceChannel, packet.Sequence))

_, err = k.sudoKeeper.Sudo(ctx, icaOwner.GetContract(), msg)
if err != nil {
k.Logger(ctx).Debug("HandleTimeout: failed to Sudo contract on packet timeout", "error", err)
Expand Down
14 changes: 0 additions & 14 deletions x/interchaintxs/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,20 +138,6 @@ func (k Keeper) SubmitTx(goCtx context.Context, msg *ictxtypes.MsgSubmitTx) (*ic
Memo: msg.Memo,
}

// TODO remove feekeeper module
// sequence, found := k.channelKeeper.GetNextSequenceSend(ctx, portID, channelID)
// if !found {
// return nil, errors.Wrapf(
// channeltypes.ErrSequenceSendNotFound,
// "source port: %s, source channel: %s", portID, channelID,
// )
// }

// TODO remove feekeeper module
// if err := k.feeKeeper.LockFees(ctx, senderAddr, feetypes.NewPacketID(portID, channelID, sequence), msg.Fee); err != nil {
// return nil, errors.Wrapf(err, "failed to lock fees to pay for SubmitTx msg: %s", msg)
// }

resp, err := k.icaControllerMsgServer.SendTx(ctx, &icacontrollertypes.MsgSendTx{
Owner: icaOwner,
ConnectionId: msg.ConnectionId,
Expand Down
5 changes: 0 additions & 5 deletions x/interchaintxs/types/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ func (msg *MsgRegisterInterchainAccount) GetSignBytes() []byte {
//----------------------------------------------------------------

func (msg *MsgSubmitTx) Validate() error {
// TODO remove feerefunder module
// if err := msg.Fee.Validate(); err != nil {
// return err
// }

if len(msg.ConnectionId) == 0 {
return ErrEmptyConnectionID
}
Expand Down
6 changes: 0 additions & 6 deletions x/transfer/ibc_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ func (im IBCModule) HandleAcknowledgement(ctx sdk.Context, packet channeltypes.P
return nil
}

// TODO remove feekeeper module
// im.wrappedKeeper.FeeKeeper.DistributeAcknowledgementFee(ctx, relayer, feetypes.NewPacketID(packet.SourcePort, packet.SourceChannel, packet.Sequence))

msg, err := keeper.PrepareSudoCallbackMessage(packet, &ack)
if err != nil {
return errors.Wrapf(sdkerrors.ErrJSONMarshal, "failed to marshal Packet/Acknowledgment: %v", err)
Expand Down Expand Up @@ -68,9 +65,6 @@ func (im IBCModule) HandleTimeout(ctx sdk.Context, packet channeltypes.Packet, r
return errors.Wrapf(sdkerrors.ErrJSONMarshal, "failed to marshal Packet: %v", err)
}

// TODO remove feekeeper module
// im.wrappedKeeper.FeeKeeper.DistributeTimeoutFee(ctx, relayer, feetypes.NewPacketID(packet.SourcePort, packet.SourceChannel, packet.Sequence))

_, err = im.sudoKeeper.Sudo(ctx, senderAddress, msg)
if err != nil {
im.keeper.Logger(ctx).Debug("HandleAcknowledgement: failed to Sudo contract on packet timeout", "error", err)
Expand Down
9 changes: 0 additions & 9 deletions x/transfer/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,6 @@ func (k KeeperTransferWrapper) Transfer(goCtx context.Context, msg *wrappedtypes
)
}

// TODO remove feekeeper module
// if the sender is a contract, lock fees.
// Because contracts are required to pay fees for the acknowledgements
// if isContract {
// if err := k.FeeKeeper.LockFees(ctx, senderAddr, feetypes.NewPacketID(msg.SourcePort, msg.SourceChannel, sequence), msg.Fee); err != nil {
// return nil, errors.Wrapf(err, "failed to lock fees to pay for transfer msg: %v", msg)
// }
// }

transferMsg := types.NewMsgTransfer(msg.SourcePort, msg.SourceChannel, msg.Token, msg.Sender, msg.Receiver, msg.TimeoutHeight, msg.TimeoutTimestamp, msg.Memo)
if _, err := k.Keeper.Transfer(goCtx, transferMsg); err != nil {
return nil, err
Expand Down
7 changes: 0 additions & 7 deletions x/transfer/types/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ import (
)

func (msg *MsgTransfer) Validate(isContract bool) error {
// TODO remove feerefunder module
// if isContract {
// if err := msg.Fee.Validate(); err != nil {
// return err
// }
// }

sdkMsg := types.NewMsgTransfer(msg.SourcePort, msg.SourceChannel, msg.Token, msg.Sender, msg.Receiver, msg.TimeoutHeight, msg.TimeoutTimestamp, msg.Memo)
return sdkMsg.ValidateBasic()
}
Expand Down

0 comments on commit 78c7762

Please sign in to comment.