1
0

wallet: add sighash check to class Abstract_Wallet

qml: use backend sighash check and add user confirmation path
qt: use backend sighash check and add user confirmation path
qml: include get_warning_for_risk_of_burning_coins_as_fees test in txdetails
qt: add warning icon to sighash warning
add sighash and fee checks to wallet.sign_transaction, making all warnings fatal unless ignore_warnings is set to True
tests: test sign_transaction on both code paths with ignore_warnings True and False,
raise specific exceptions TransactionPotentiallyDangerousException and TransactionDangerousException
This commit is contained in:
Sander van Grieken
2023-11-20 15:23:49 +01:00
committed by accumulator
parent 6467db0b7d
commit 7b96a83350
9 changed files with 167 additions and 22 deletions

View File

@@ -49,6 +49,16 @@ Pane {
text: qsTr('On-chain Transaction')
}
InfoTextArea {
id: warn
Layout.columnSpan: 2
Layout.fillWidth: true
Layout.bottomMargin: constants.paddingLarge
visible: txdetails.warning
text: txdetails.warning
iconStyle: InfoTextArea.IconStyle.Warn
}
InfoTextArea {
id: bumpfeeinfo
Layout.columnSpan: 2
@@ -336,7 +346,20 @@ Pane {
icon.source: '../../icons/key.png'
text: qsTr('Sign')
visible: txdetails.canSign
onClicked: txdetails.sign()
onClicked: {
if (txdetails.shouldConfirm) {
var dialog = app.messageDialog.createObject(app, {
text: qsTr('Confirm signing non-standard transaction?'),
yesno: true
})
dialog.accepted.connect(function() {
txdetails.sign()
})
dialog.open()
} else {
txdetails.sign()
}
}
}
FlatButton {