From 24e01ffa7cf85c1864978c6c716beac74398e15a Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Wed, 16 Sep 2020 08:58:08 -0400 Subject: [PATCH] fix: code review --- .../Profile/Sections/Ens/RegisterENSModal.qml | 28 +++---------------- .../Sections/Ens/TermsAndConditions.qml | 1 - 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/ui/app/AppLayouts/Profile/Sections/Ens/RegisterENSModal.qml b/ui/app/AppLayouts/Profile/Sections/Ens/RegisterENSModal.qml index d50fda2d11..baa0daf2c5 100644 --- a/ui/app/AppLayouts/Profile/Sections/Ens/RegisterENSModal.qml +++ b/ui/app/AppLayouts/Profile/Sections/Ens/RegisterENSModal.qml @@ -11,7 +11,6 @@ ModalPopup { property string ensUsername: "" property string ensPrice: "10" - property bool showBackBtn: false title: qsTr("Authorize %1 %2").arg(Utils.stripTrailingZeros(ensPrice)).arg(asset.symbol) property MessageDialog sendingError: MessageDialog { @@ -72,10 +71,6 @@ ModalPopup { headerText: qsTr("Authorize %1 %2").arg(Utils.stripTrailingZeros(root.ensPrice)).arg(root.asset.symbol) footerText: qsTr("Continue") - StackView.onActivated: { - btnBack.visible = root.showBackBtn - } - AccountSelector { id: selectFromAccount accounts: walletModel.accounts @@ -116,7 +111,7 @@ ModalPopup { } property var estimateGas: Backpressure.debounce(gasSelector, 600, function() { if (!(root.ensUsername !== "" && selectFromAccount.selectedAccount)) { - selectedGasLimit = 325000 + selectedGasLimit = 380000 return } selectedGasLimit = profileModel.ens.registerENSGasEstimate(root.ensUsername, selectFromAccount.selectedAccount.address) @@ -143,10 +138,6 @@ ModalPopup { headerText: qsTr("Authorize %1 %2").arg(Utils.stripTrailingZeros(root.ensPrice)).arg(root.asset.symbol) footerText: qsTr("Sign with password") - StackView.onActivated: { - btnBack.visible = true - } - TransactionPreview { id: pvwTransaction width: stack.width @@ -198,26 +189,15 @@ ModalPopup { anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right - StyledButton { - id: btnBack - anchors.left: parent.left - //% "Back" - label: qsTrId("back") - onClicked: { - if (stack.isFirstGroup) { - return root.close() - } - stack.back() - } - } + StyledButton { id: btnNext anchors.right: parent.right label: qsTr("Next") disabled: !stack.currentGroup.isValid onClicked: { - - if (stack.currentGroup.validate()) { + const validity = stack.currentGroup.validate() + if (validity.isValid && !validity.isPending) { if (stack.isLastGroup) { return root.sendTransaction() } diff --git a/ui/app/AppLayouts/Profile/Sections/Ens/TermsAndConditions.qml b/ui/app/AppLayouts/Profile/Sections/Ens/TermsAndConditions.qml index 759baa4971..39bc2b7c21 100644 --- a/ui/app/AppLayouts/Profile/Sections/Ens/TermsAndConditions.qml +++ b/ui/app/AppLayouts/Profile/Sections/Ens/TermsAndConditions.qml @@ -27,7 +27,6 @@ Item { ensUsername: username width: 400 height: 400 - showBackBtn: false } ModalPopup {