Skip to content

Commit fc75ce6

Browse files
committed
fix
1 parent 696a201 commit fc75ce6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

x/amm/keeper/query_join_pool_estimation.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,10 @@ func (k Keeper) JoinPoolEst(
9393
bonusTokenAmount = treasuryTokenAmount
9494
}
9595
}
96-
return tokensJoined, sharesOut, slippage, weightBalanceBonus, swapFee, takerFeesFinal, sdk.NewCoin(otherAsset.Token.Denom, bonusTokenAmount), nil
96+
rewards := sdk.Coin{}
97+
if otherAsset.Token.Denom != "" && bonusTokenAmount.IsPositive() {
98+
rewards = sdk.NewCoin(otherAsset.Token.Denom, bonusTokenAmount)
99+
}
100+
101+
return tokensJoined, sharesOut, slippage, weightBalanceBonus, swapFee, takerFeesFinal, rewards, nil
97102
}

0 commit comments

Comments
 (0)