fix(SlippageSelector): cant do Swap with 100% slippage

- set the max custom limit to < 100%
- add a regression test

Fixes #16394
This commit is contained in:
Lukáš Tinkl 2024-09-25 12:19:27 +02:00 committed by Lukáš Tinkl
parent 5476cde165
commit 655918a279
2 changed files with 2 additions and 1 deletions

View File

@ -120,6 +120,7 @@ Item {
{tag: "valid", value: 1.42, valid: true, isDefault: false},
{tag: "default", value: 0.5, valid: true, isDefault: true},
{tag: "invalid", value: 111.42, valid: false, isDefault: false},
{tag: "hundred", value: 100, valid: false, isDefault: false},
]
}

View File

@ -102,7 +102,7 @@ Control {
visible: !customButton.visible
minValue: 0.01
maxValue: 100.0
maxValue: 99.99
maximumLength: 6 // 3 integral + separator + 2 decimals (e.g. "999.99")
currencySymbol: d.customSymbol
onValueChanged: d.update(value)