Skip to content

Commit

Permalink
fix fee deduction on stream send (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
harish551 authored Jan 4, 2024
1 parent 1a61af9 commit 892b856
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x/streampay/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (m msgServer) StreamSend(goCtx context.Context, msg *types.MsgStreamSend) (
return nil, err
}
feePercentage := m.Keeper.GetStreamPaymentFeePercentage(ctx)
feeAmount := sdk.NewCoin(msg.Amount.Denom, msg.Amount.Amount.ToLegacyDec().Mul(feePercentage).TruncateInt())
feeAmount := sdk.NewCoin(msg.Amount.Denom, sdk.NewDecFromInt(msg.Amount.Amount).Mul(feePercentage).TruncateInt())
amountToSend := msg.Amount.SubAmount(feeAmount.Amount)

if err := m.distributionKeeper.FundCommunityPool(ctx, sdk.NewCoins(feeAmount), sender); err != nil {
Expand Down

0 comments on commit 892b856

Please sign in to comment.