From 717b8e43755b16cc02c329f241c5d55e9f82a400 Mon Sep 17 00:00:00 2001 From: Harish Marri Date: Thu, 4 Jan 2024 22:17:15 +0530 Subject: [PATCH] fix fee deduction on stream send --- x/streampay/keeper/msg_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/streampay/keeper/msg_server.go b/x/streampay/keeper/msg_server.go index 04853a1..60ee3df 100644 --- a/x/streampay/keeper/msg_server.go +++ b/x/streampay/keeper/msg_server.go @@ -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 {