From 8b465c20f75e9e5cbd389ba53f30da315c0613bf Mon Sep 17 00:00:00 2001 From: emizzle Date: Mon, 12 Oct 2020 22:44:04 +1100 Subject: [PATCH] start of rebase fixes Sign and send modal is showing the incorrect "from" account in the TransactionPreview... --- ui/app/AppLayouts/Chat/ChatColumn.qml | 6 +++--- .../Chat/ChatColumn/ChatComponents/ChatCommandModal.qml | 2 +- .../Chat/ChatColumn/MessageComponents/TransactionBubble.qml | 6 +++--- ui/shared/status/StatusChatCommandsPopup.qml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ui/app/AppLayouts/Chat/ChatColumn.qml b/ui/app/AppLayouts/Chat/ChatColumn.qml index c3fc021e91..4bf7c3fb4a 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn.qml @@ -49,7 +49,7 @@ StackLayout { } function requestAddressForTransaction(address, amount, tokenAddress, tokenDecimals = 18) { - amount = walletModel.eth2Wei(amount.toString(), tokenDecimals) + amount = utilsModel.eth2Wei(amount.toString(), tokenDecimals) chatsModel.requestAddressForTransaction(chatsModel.activeChannel.id, address, amount, @@ -57,7 +57,7 @@ StackLayout { chatCommandModal.close() } function requestTransaction(address, amount, tokenAddress, tokenDecimals = 18) { - amount = walletModel.eth2Wei(amount.toString(), tokenDecimals) + amount = utilsModel.eth2Wei(amount.toString(), tokenDecimals) chatsModel.requestTransaction(chatsModel.activeChannel.id, address, amount, @@ -235,7 +235,7 @@ StackLayout { chatCommandModal.open() } onReceiveTransactionCommandButtonClicked: { - chatCommandModal.sendChatCommand = root.requestTransaction + chatCommandModal.sendChatCommand = chatColumnLayout.requestTransaction chatCommandModal.isRequested = true //% "Request" chatCommandModal.commandTitle = qsTrId("wallet-request") diff --git a/ui/app/AppLayouts/Chat/ChatColumn/ChatComponents/ChatCommandModal.qml b/ui/app/AppLayouts/Chat/ChatColumn/ChatComponents/ChatCommandModal.qml index 18837dcbc1..08deef5a5e 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn/ChatComponents/ChatCommandModal.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn/ChatComponents/ChatCommandModal.qml @@ -43,10 +43,10 @@ ModalPopup { selectedAccount: walletModel.currentAccount currency: walletModel.defaultCurrency width: stack.width - //% "From account" label: { return root.isRequested ? qsTr("Receive on account") : + //% "From account" qsTrId("from-account") } reset: function() { diff --git a/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/TransactionBubble.qml b/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/TransactionBubble.qml index 5474bb2d71..32852861ea 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/TransactionBubble.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/TransactionBubble.qml @@ -83,8 +83,8 @@ Item { switch (root.state) { case Constants.pending: case Constants.confirmed: - case Constants.transactionRequested: case Constants.addressRequested: return isCurrentUser + case Constants.transactionRequested: case Constants.declined: case Constants.transactionDeclined: case Constants.addressReceived: return !isCurrentUser @@ -119,7 +119,7 @@ Item { id: title color: Style.current.secondaryText //% "↑ Outgoing transaction" - text: outgoing ? + text: root.outgoing ? qsTrId("--outgoing-transaction") : //% "↓ Incoming transaction" qsTrId("--incoming-transaction") @@ -190,7 +190,7 @@ Item { id: buttonsLoader active: (root.state === Constants.addressRequested && !root.outgoing) || (root.state === Constants.addressReceived && root.outgoing) || - (root.state === Constants.transactionRequested && !root.outgoing) + (root.state === Constants.transactionRequested) sourceComponent: root.outgoing ? signAndSendComponent : acceptTransactionComponent anchors.top: bubbleLoader.active ? bubbleLoader.bottom : valueContainer.bottom anchors.topMargin: bubbleLoader.active ? root.innerMargin : 20 diff --git a/ui/shared/status/StatusChatCommandsPopup.qml b/ui/shared/status/StatusChatCommandsPopup.qml index 8c330fff4e..47aa000910 100644 --- a/ui/shared/status/StatusChatCommandsPopup.qml +++ b/ui/shared/status/StatusChatCommandsPopup.qml @@ -60,7 +60,7 @@ Popup { icon.height: 18 iconRotation: 180 onClicked: function () { - root.sendTransactionCommandButtonClicked() + root.receiveTransactionCommandButtonClicked() } }