Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
RustNinja committed May 22, 2024
1 parent 46a2f67 commit 1ac7678
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions custom/custompfm/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ func NewIBCMiddleware(
IBCMiddleware: router.NewIBCMiddleware(app, k, retriesOnTimeout, forwardTimeout, refundTimeout),
ibcfeekeeper: ibcfeekeeper,

//we need this bz this field is not exported in the parent struct
app1: app,
keeper1: k,
retriesOnTimeout1: retriesOnTimeout,
Expand Down Expand Up @@ -206,7 +205,7 @@ func (im IBCMiddleware) OnRecvPacket(
if result.Fee.Amount.LT(token.Amount) {
token = token.SubAmount(result.Fee.Amount)
} else {
send_err := im.bank.SendCoins(ctx, result.Sender, result.Reciever, sdk.NewCoins(result.Fee))
send_err := im.bank.SendCoins(ctx, result.Sender, result.Receiver, sdk.NewCoins(result.Fee))
if send_err != nil {
logger.Error("packetForwardMiddleware OnRecvPacket error sending fee", "error", send_err)
return newErrorAcknowledgement(fmt.Errorf("error charging fee: %w", send_err))
Expand Down
4 changes: 2 additions & 2 deletions x/ibctransfermiddleware/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (k Keeper) GetChannelFeeAddress(ctx sdk.Context, targetChannelID string) st
type BridgeFee struct {
Fee sdk.Coin
Sender sdk.AccAddress
Reciever sdk.AccAddress
Receiver sdk.AccAddress
}

func (k Keeper) ChargeFee(ctx sdk.Context, msg *ibctypes.MsgTransfer) (*BridgeFee, error) {
Expand Down Expand Up @@ -179,7 +179,7 @@ func (k Keeper) ChargeFee(ctx sdk.Context, msg *ibctypes.MsgTransfer) (*BridgeFe
// return nil, send_err
// }
msg.Token.Amount = newAmount
return &BridgeFee{Fee: charge_coin, Sender: msgSender, Reciever: feeAddress}, nil
return &BridgeFee{Fee: charge_coin, Sender: msgSender, Receiver: feeAddress}, nil

// if newAmount.LTE(sdk.ZeroInt()) {
// zeroTransfer := sdk.NewCoin(msg.Token.Denom, sdk.ZeroInt())
Expand Down

0 comments on commit 1ac7678

Please sign in to comment.