From e7517c2ce4da2eb1f1932beed52d4c6e5be4043d Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 31 Oct 2023 12:31:56 -0400 Subject: [PATCH] fix: improve error message for slippage bound when LPing (#6788) * fix: improve error message for slippage bound when LPing * updates * changelog --- CHANGELOG.md | 4 ++++ x/concentrated-liquidity/types/errors.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db9cf5d3994..08acd78a1cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#6758](https://github.com/osmosis-labs/osmosis/pull/6758) Add codec for MsgUndelegateFromRebalancedValidatorSet +### Misc Improvements + +* [#6788](https://github.com/osmosis-labs/osmosis/pull/6788) Improve error message when CL LP fails due to slippage bound hit. + ## v20.0.0 ### Features diff --git a/x/concentrated-liquidity/types/errors.go b/x/concentrated-liquidity/types/errors.go index 440c73beff4..4828d40ccd0 100644 --- a/x/concentrated-liquidity/types/errors.go +++ b/x/concentrated-liquidity/types/errors.go @@ -136,7 +136,7 @@ func (e InsufficientLiquidityCreatedError) Error() string { if !e.IsTokenZero { tokenNum = 1 } - return fmt.Sprintf("insufficient amount of token %d created. Actual: (%s). Minimum (%s)", tokenNum, e.Actual, e.Minimum) + return fmt.Sprintf("slippage bound: insufficient amount of token %d created. Actual: (%s). Minimum estimated: (%s)", tokenNum, e.Actual, e.Minimum) } type NegativeLiquidityError struct {