bug: Slippage settings accepts negative numbers and text input #17

Closed
opened 2026-03-13 02:37:55 +00:00 by Brouie · 6 comments
Brouie commented 2026-03-13 02:37:55 +00:00 (Migrated from gitlab.com)

Description

Custom slippage input field accepts negative numbers and alphabetic characters without validation or warning.

Expected

  • Negative values should be rejected or show error
  • Non-numeric input should be blocked
  • Valid range should be enforced (e.g. 0.01% to 49.99%)

Steps to Reproduce

  1. Open Swap page
  2. Click Settings
  3. Enter negative number (e.g. -5) — accepted
  4. Enter text (e.g. 'abc') — accepted

Notes

High slippage warning works correctly for values 6-100%, but no validation for negative or text values.

## Description Custom slippage input field accepts negative numbers and alphabetic characters without validation or warning. ## Expected - Negative values should be rejected or show error - Non-numeric input should be blocked - Valid range should be enforced (e.g. 0.01% to 49.99%) ## Steps to Reproduce 1. Open Swap page 2. Click Settings 3. Enter negative number (e.g. -5) — accepted 4. Enter text (e.g. 'abc') — accepted ## Notes High slippage warning works correctly for values 6-100%, but no validation for negative or text values.
Brouie commented 2026-03-13 04:22:44 +00:00 (Migrated from gitlab.com)

mentioned in issue #18

mentioned in issue #18
PlasticDigits commented 2026-03-13 06:53:54 +00:00 (Migrated from gitlab.com)

Fix implemented in bdc1836.

Changes:

  • Sanitize input to allow only digits and one decimal point (blocks text and negative values)
  • Enforce valid range 0.01% to 50%, cap values > 50 at 50%
  • Show error message "Must be between 0.01% and 50%" when value is invalid

@brouie please review when you have a moment.

Fix implemented in bdc1836. **Changes:** - Sanitize input to allow only digits and one decimal point (blocks text and negative values) - Enforce valid range 0.01% to 50%, cap values > 50 at 50% - Show error message "Must be between 0.01% and 50%" when value is invalid @brouie please review when you have a moment.
PlasticDigits commented 2026-03-13 06:53:55 +00:00 (Migrated from gitlab.com)

assigned to @Brouie

assigned to @Brouie
Brouie (Migrated from gitlab.com) closed this issue 2026-03-13 12:18:44 +00:00
Brouie commented 2026-03-13 12:18:45 +00:00 (Migrated from gitlab.com)

Verified fixed — slippage input blocks text and negative values, caps at 50%, shows error for invalid range.

Verified fixed — slippage input blocks text and negative values, caps at 50%, shows error for invalid range.
Brouie commented 2026-04-04 04:34:13 +00:00 (Migrated from gitlab.com)

mentioned in issue #49

mentioned in issue #49
Brouie commented 2026-04-06 03:36:43 +00:00 (Migrated from gitlab.com)

mentioned in issue #50

mentioned in issue #50
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic#17
No description provided.