feat(@wallet): check for url not being a url

This commit is contained in:
Anthony Laibe 2023-07-18 16:02:03 +02:00 committed by Anthony Laibe
parent daae249fae
commit 0cc91fb315
1 changed files with 9 additions and 0 deletions

View File

@ -29,6 +29,15 @@ ColumnLayout {
property int evaluationStatus: EditNetworkForm.UnTouched
property int evaluationStatusFallBackRpc: EditNetworkForm.UnTouched
property var evaluateRpcEndPoint: Backpressure.debounce(root, 400, function (value) {
if(!Utils.isURL(value)) {
if(value === mainRpcInput.text) {
d.evaluationStatus = EditNetworkForm.InvalidURL
}
else if(value === failoverRpcUrlInput.text) {
d.evaluationStatusFallBackRpc = EditNetworkForm.InvalidURL
}
return
}
root.evaluateRpcEndPoint(value)
})