start of rebase fixes

Sign and send modal is showing the incorrect "from" account in the TransactionPreview...
This commit is contained in:
emizzle 2020-10-12 22:44:04 +11:00 committed by Pascal Precht
parent 423882df89
commit 8b465c20f7
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
4 changed files with 8 additions and 8 deletions

View File

@ -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")

View File

@ -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() {

View File

@ -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

View File

@ -60,7 +60,7 @@ Popup {
icon.height: 18
iconRotation: 180
onClicked: function () {
root.sendTransactionCommandButtonClicked()
root.receiveTransactionCommandButtonClicked()
}
}