fix: fix a couple of warning with the send modal
This commit is contained in:
parent
76f12c20f7
commit
cd061895c2
|
@ -30,7 +30,7 @@ ModalPopup {
|
||||||
|
|
||||||
SendModalContent {
|
SendModalContent {
|
||||||
id: sendModalContent
|
id: sendModalContent
|
||||||
accounts: walletModel.accounts
|
accounts: []
|
||||||
}
|
}
|
||||||
|
|
||||||
footer: StyledButton {
|
footer: StyledButton {
|
||||||
|
|
|
@ -11,7 +11,10 @@ Item {
|
||||||
property var accounts
|
property var accounts
|
||||||
property string defaultAccount: "0x1234"
|
property string defaultAccount: "0x1234"
|
||||||
property int selectedAccountIndex: 0
|
property int selectedAccountIndex: 0
|
||||||
property string selectedAccountAddress: accounts[selectedAccountIndex].address
|
property string selectedAccountAddress: accounts && accounts.length ? accounts[selectedAccountIndex].address : ""
|
||||||
|
property string selectedAccountName: accounts && accounts.length ? accounts[selectedAccountIndex].name : ""
|
||||||
|
property string selectedAccountIconColor: accounts && accounts.length ? accounts[selectedAccountIndex].iconColor : ""
|
||||||
|
|
||||||
|
|
||||||
property string passwordValidationError: ""
|
property string passwordValidationError: ""
|
||||||
property string toValidationError: ""
|
property string toValidationError: ""
|
||||||
|
@ -63,11 +66,11 @@ Item {
|
||||||
iconHeight: 12
|
iconHeight: 12
|
||||||
iconWidth: 12
|
iconWidth: 12
|
||||||
icon: "../../../img/walletIcon.svg"
|
icon: "../../../img/walletIcon.svg"
|
||||||
iconColor: accounts[selectedAccountIndex].iconColor
|
iconColor: selectedAccountIconColor
|
||||||
label: qsTr("From account")
|
label: qsTr("From account")
|
||||||
anchors.top: txtAmount.bottom
|
anchors.top: txtAmount.bottom
|
||||||
anchors.topMargin: Theme.padding
|
anchors.topMargin: Theme.padding
|
||||||
selectedText: accounts[selectedAccountIndex].name
|
selectedText: selectedAccountName
|
||||||
selectOptions: sendModalContent.accounts.map(function (account, index) {
|
selectOptions: sendModalContent.accounts.map(function (account, index) {
|
||||||
return {
|
return {
|
||||||
text: account.name,
|
text: account.name,
|
||||||
|
@ -80,7 +83,7 @@ Item {
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
id: textSelectAccountAddress
|
id: textSelectAccountAddress
|
||||||
text: accounts[selectedAccountIndex].address
|
text: selectedAccountAddress
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 2
|
anchors.leftMargin: 2
|
||||||
|
|
|
@ -133,8 +133,6 @@ Item {
|
||||||
MenuItem {
|
MenuItem {
|
||||||
property var onClicked: console.log("Default click function. Override me please")
|
property var onClicked: console.log("Default click function. Override me please")
|
||||||
property color bgColor: Theme.white
|
property color bgColor: Theme.white
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.left: parent.left
|
|
||||||
onTriggered: function () {
|
onTriggered: function () {
|
||||||
onClicked()
|
onClicked()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue