Skip to content

Commit

Permalink
fixed add liquidity logic
Browse files Browse the repository at this point in the history
  • Loading branch information
thr2240 committed Oct 16, 2023
1 parent a4ff3fb commit adac900
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/liquidity/keeper/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,8 @@ func (k Keeper) FinishDepositRequest(
return nil
}

refundingCoins := req.DepositCoins.Sub(req.AcceptedCoins[0])
refundingCoins := req.DepositCoins.Sub(req.AcceptedCoins[0]).Sub(req.AcceptedCoins[1])

if !refundingCoins.IsZero() {
if err := k.bankKeeper.SendCoins(ctx, types.GlobalEscrowAddress, req.GetDepositor(), refundingCoins); err != nil {
return err
Expand Down

0 comments on commit adac900

Please sign in to comment.