fix: update tx modal validity
This commit is contained in:
parent
2a59ab402d
commit
1fc0e26a0f
|
@ -29,7 +29,7 @@ ModalPopup {
|
|||
anchors.rightMargin: Style.current.padding
|
||||
onGroupActivated: {
|
||||
root.title = group.headerText
|
||||
btnNext.label = group.footerText
|
||||
btnNext.text = group.footerText
|
||||
}
|
||||
TransactionFormGroup {
|
||||
id: group1
|
||||
|
@ -166,16 +166,15 @@ ModalPopup {
|
|||
stack.back()
|
||||
}
|
||||
}
|
||||
StyledButton {
|
||||
StatusButton {
|
||||
id: btnNext
|
||||
anchors.right: parent.right
|
||||
//% "Next"
|
||||
label: qsTrId("next")
|
||||
disabled: !stack.currentGroup.isValid
|
||||
text: qsTrId("next")
|
||||
enabled: stack.currentGroup.isValid && !stack.currentGroup.isPending
|
||||
onClicked: {
|
||||
const isValid = stack.currentGroup.validate()
|
||||
|
||||
if (stack.currentGroup.validate()) {
|
||||
const validity = stack.currentGroup.validate()
|
||||
if (validity.isValid && !validity.isPending) {
|
||||
if (stack.isLastGroup) {
|
||||
return root.sendChatCommand(selectFromAccount.selectedAccount.address,
|
||||
txtAmount.selectedAmount,
|
||||
|
|
|
@ -60,7 +60,7 @@ ModalPopup {
|
|||
anchors.rightMargin: Style.current.padding
|
||||
onGroupActivated: {
|
||||
root.title = group.headerText
|
||||
btnNext.label = group.footerText
|
||||
btnNext.text = group.footerText
|
||||
}
|
||||
TransactionFormGroup {
|
||||
id: group1
|
||||
|
@ -196,16 +196,15 @@ ModalPopup {
|
|||
stack.back()
|
||||
}
|
||||
}
|
||||
StyledButton {
|
||||
StatusButton {
|
||||
id: btnNext
|
||||
anchors.right: parent.right
|
||||
//% "Next"
|
||||
label: qsTrId("next")
|
||||
disabled: !stack.currentGroup.isValid
|
||||
text: qsTrId("next")
|
||||
enabled: stack.currentGroup.isValid && !stack.currentGroup.isPending
|
||||
onClicked: {
|
||||
const isValid = stack.currentGroup.validate()
|
||||
|
||||
if (stack.currentGroup.validate()) {
|
||||
const validity = stack.currentGroup.validate()
|
||||
if (validity.isValid && !validity.isPending) {
|
||||
if (stack.isLastGroup) {
|
||||
return root.sendTransaction()
|
||||
}
|
||||
|
|
|
@ -214,11 +214,9 @@ ModalPopup {
|
|||
//% "Next"
|
||||
text: qsTrId("next")
|
||||
enabled: stack.currentGroup.isValid && !stack.currentGroup.isPending
|
||||
state: stack.currentGroup.isPending ? "pending" : "default"
|
||||
onClicked: {
|
||||
const isValid = stack.currentGroup.validate()
|
||||
|
||||
if (stack.currentGroup.validate()) {
|
||||
const validity = stack.currentGroup.validate()
|
||||
if (validity.isValid && !validity.isPending) {
|
||||
if (stack.isLastGroup) {
|
||||
return root.sendTransaction()
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import QtQuick.Layouts 1.13
|
|||
import QtQuick.Dialogs 1.3
|
||||
import "../../../../../imports"
|
||||
import "../../../../../shared"
|
||||
import "../../../../../shared/status"
|
||||
|
||||
ModalPopup {
|
||||
id: root
|
||||
|
@ -55,7 +56,7 @@ ModalPopup {
|
|||
anchors.rightMargin: Style.current.padding
|
||||
onGroupActivated: {
|
||||
root.title = group.headerText
|
||||
btnNext.label = group.footerText
|
||||
btnNext.text = group.footerText
|
||||
}
|
||||
TransactionFormGroup {
|
||||
id: group1
|
||||
|
@ -188,12 +189,11 @@ ModalPopup {
|
|||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
StyledButton {
|
||||
StatusButton {
|
||||
id: btnNext
|
||||
anchors.right: parent.right
|
||||
//% "Next"
|
||||
label: qsTrId("next")
|
||||
disabled: !stack.currentGroup.isValid
|
||||
text: qsTr("Next")
|
||||
enabled: stack.currentGroup.isValid && !stack.currentGroup.isPending
|
||||
onClicked: {
|
||||
const validity = stack.currentGroup.validate()
|
||||
if (validity.isValid && !validity.isPending) {
|
||||
|
|
|
@ -249,7 +249,7 @@ ModalPopup {
|
|||
anchors.right: parent.right
|
||||
//% "Next"
|
||||
text: qsTrId("next")
|
||||
enabled: !(!stack.currentGroup.isValid || stack.currentGroup.isPending)
|
||||
enabled: stack.currentGroup.isValid && !stack.currentGroup.isPending
|
||||
state: stack.currentGroup.isPending ? "pending" : "default"
|
||||
onClicked: {
|
||||
const validity = stack.currentGroup.validate()
|
||||
|
|
Loading…
Reference in New Issue