fix: broken validation in Total finite supply field

do not try to assign `supply` value in case of error

Fixes #11122
This commit is contained in:
Lukáš Tinkl 2023-06-22 10:38:38 +02:00 committed by Lukáš Tinkl
parent bb7f744c57
commit ae9a52397c
1 changed files with 6 additions and 2 deletions

View File

@ -290,10 +290,14 @@ StatusScrollView {
extraValidator.errorMessage: qsTr("Enter a number between 1 and 999,999,999")
onTextChanged: {
const amount = parseInt(text)
if (Number.isNaN(amount) || !!errors)
return
if(root.isAssetView)
asset.supply = parseInt(text)
asset.supply = amount
else
collectible.supply = parseInt(text)
collectible.supply = amount
}
}