fix(@desktop/wallet): Fix for - Recipient of the transaction message is not notified that transaction is completed

Also fixes broken UI when sending/receveing transactions from chat

fixes #2915
This commit is contained in:
Khushboo Mehta 2022-01-10 17:42:36 +01:00 committed by Khushboo-dev-cpp
parent 7f058f3141
commit 35388b0f6d
2 changed files with 18 additions and 14 deletions

View File

@ -89,7 +89,7 @@ StatusModal {
initialItem: groupPreview
isLastGroup: stack.currentGroup === groupSignTx
onGroupActivated: {
root.title = group.headerText
root.header.title = group.headerText
btnNext.text = group.footerText
}
TransactionFormGroup {
@ -126,8 +126,8 @@ StatusModal {
RecipientSelector {
id: selectRecipient
visible: false
accounts: root.store.walletModelInst.accountsView.accounts
contacts: root.store.profileModelInst.contacts.addedContacts
accounts: root.store.accounts
contacts: root.store.addedContacts
selectedRecipient: root.selectedRecipient
readOnly: true
}
@ -282,7 +282,6 @@ StatusModal {
rightButtons: [
StatusButton {
id: btnNext
anchors.right: parent.right
//% "Next"
text: qsTrId("next")
enabled: stack.currentGroup.isValid && !stack.currentGroup.isPending

View File

@ -4,6 +4,7 @@ import shared 1.0
import shared.panels 1.0
import shared.popups 1.0
import shared.views.chat 1.0
import shared.controls 1.0
import shared.controls.chat 1.0
Item {
@ -189,7 +190,7 @@ Item {
SendTransactionButton {
// outgoing: root.outgoing
acc: root.store.walletModelInst.accountsView.focusedAccount
acc: root.store.currentAccount
selectedAsset: token
selectedAmount: tokenAmount
selectedFiatAmount: fiatValue
@ -218,17 +219,21 @@ Item {
Component {
id: signTxComponent
SignTransactionModal {
anchors.centerIn: parent
store: root.store
selectedAsset: root.selectedAsset
selectedAmount: root.selectedAmount
selectedRecipient: root.selectedRecipient
selectedFiatAmount: root.selectedFiatAmount
onOpened: {
root.store.walletModelInst.gasView.getGasPrice();
}
onClosed: {
destroy();
selectedAsset: token
selectedAmount: tokenAmount
selectedRecipient: {
return {
address: commandParametersObject.address,
identicon: root.store.chatsModelInst.channelView.activeChannel.identicon,
name: root.store.chatsModelInst.channelView.activeChannel.name,
type: RecipientSelector.Type.Contact
}
}
selectedFiatAmount: fiatValue
onOpened: root.store.walletModelInst.gasView.getGasPrice();
onClosed: destroy();
}
}