add sign transaction modal for incoming tx request

also remove `outgoing` property that was previously added
This commit is contained in:
emizzle 2020-10-19 11:57:38 +11:00 committed by Pascal Precht
parent e455586990
commit 32a4afe037
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
3 changed files with 24 additions and 3 deletions

View File

@ -196,7 +196,7 @@ Item {
id: signAndSendComponent
SendTransactionButton {
outgoing: root.outgoing
// outgoing: root.outgoing
}
}

View File

@ -1,4 +1,5 @@
import QtQuick 2.3
import "../../ChatComponents"
import "../../../../../../shared"
import "../../../../../../imports"
@ -37,7 +38,7 @@ Item {
// TODO get address from a modal instead
chatsModel.acceptRequestAddressForTransaction(messageId, walletModel.getDefaultAccount())
} else if (root.state === Constants.transactionRequested) {
console.log('Accept and send')
signTransactionModal.open()
}
}
}
@ -76,6 +77,26 @@ Item {
}
}
}
SignTransactionModal {
id: signTransactionModal
onOpened: {
walletModel.getGasPricePredictions()
}
selectedAccount: {}
selectedRecipient: {
return {
address: commandParametersObject.address,
identicon: chatsModel.activeChannel.identicon,
name: chatsModel.activeChannel.name,
type: RecipientSelector.Type.Contact
}
}
selectedAsset: token
selectedAmount: tokenAmount
selectedFiatAmount: fiatValue
//outgoing: root.outgoing
}
}
/*##^##

View File

@ -7,7 +7,7 @@ Item {
id: root
width: parent.width
height: childrenRect.height + Style.current.halfPadding
property bool outgoing: true
// property bool outgoing: true
Separator {
id: separator