diff --git a/ui/shared/GasSelector.qml b/ui/shared/GasSelector.qml index 069180d991..3d05e33976 100644 --- a/ui/shared/GasSelector.qml +++ b/ui/shared/GasSelector.qml @@ -127,7 +127,12 @@ Item { buttonGroup: gasGroup checkedByDefault: true text: qsTr("Optimal") - price: (fastestGasPrice + slowestGasPrice) / 2 + price: { + const price = (fastestGasPrice + slowestGasPrice) / 2 + // Setting the gas price field here because the binding didn't work + inputGasPrice.text = price + return price + } gasLimit: inputGasLimit ? inputGasLimit.text : "" getGasEthValue: root.getGasEthValue getFiatValue: root.getFiatValue @@ -182,7 +187,6 @@ Item { anchors.right: parent.right width: 130 customHeight: 56 - text: optimalGasButton.price placeholderText: "20" onTextChanged: { if (root.validate()) { diff --git a/ui/shared/GasValidator.qml b/ui/shared/GasValidator.qml index 210bd99fb3..4a0492d934 100644 --- a/ui/shared/GasValidator.qml +++ b/ui/shared/GasValidator.qml @@ -24,7 +24,7 @@ Column { function validate() { let isValid = true - if (!(selectedAccount && selectedAccount.assets && selectedAsset && selectedGasEthValue >= 0)) { + if (!(selectedAccount && selectedAccount.assets && selectedAsset && selectedGasEthValue > 0)) { return root.isValid } isValid = true