diff options
| author | xiphon <xiphon@protonmail.com> | 2019-09-28 02:00:51 +0000 |
|---|---|---|
| committer | xiphon <xiphon@protonmail.com> | 2019-09-28 02:01:20 +0000 |
| commit | f72ed257ce727ee404acf1d35b201b7977afa798 (patch) | |
| tree | b37c9d3e2c76d8f3763fbe7978c4e9badbdc07ab | |
| parent | d3b81cb6f8b9e79bc8bda675f556d5288916af56 (diff) | |
| download | monzero-gui-f72ed257ce727ee404acf1d35b201b7977afa798.tar.gz monzero-gui-f72ed257ce727ee404acf1d35b201b7977afa798.tar.xz monzero-gui-f72ed257ce727ee404acf1d35b201b7977afa798.zip | |
Transfer: forbid long Payment IDs
| -rw-r--r-- | main.qml | 5 | ||||
| -rw-r--r-- | pages/Transfer.qml | 17 | ||||
| -rw-r--r-- | pages/settings/SettingsLayout.qml | 9 |
3 files changed, 12 insertions, 19 deletions
@@ -460,10 +460,6 @@ ApplicationWindow { // Raise window appWindow.raise(); appWindow.show(); - - // @TODO: remove after paymentID deprecation - if(params.hasOwnProperty("tx_payment_id")) - persistentSettings.showPid = true; } } @@ -1371,7 +1367,6 @@ ApplicationWindow { property bool lockOnUserInActivity: true property int walletMode: 2 property int lockOnUserInActivityInterval: 10 // minutes - property bool showPid: false property bool blackTheme: true property bool fiatPriceEnabled: false diff --git a/pages/Transfer.qml b/pages/Transfer.qml index 40d2bbf9..659b376b 100644 --- a/pages/Transfer.qml +++ b/pages/Transfer.qml @@ -269,8 +269,7 @@ Rectangle { } } onTextChanged: { - // @TODO: remove after pid removal hardfork - warningLongPidTransfer = !persistentSettings.showPid && isLongPidService(text) + warningLongPidTransfer = isLongPidService(text); } inlineButton.text: FontAwesome.qrcode inlineButton.fontPixelSize: 22 @@ -360,7 +359,7 @@ Rectangle { } ColumnLayout { - visible: appWindow.persistentSettings.showPid || paymentIdCheckbox.checked + visible: paymentIdCheckbox.checked // @TODO: remove after pid removal hardfork CheckBox { id: paymentIdCheckbox @@ -383,6 +382,7 @@ Rectangle { id: paymentIdLine fontBold: true placeholderText: qsTr("64 hexadecimal characters") + translationManager.emptyString + readOnly: true Layout.fillWidth: true wrapMode: Text.WrapAnywhere addressValidation: false @@ -394,8 +394,10 @@ Rectangle { MoneroComponents.WarningBox { // @TODO: remove after pid removal hardfork id: paymentIdWarningBox - text: qsTr("You can enable transfers with payment ID on the settings page.") + translationManager.emptyString; - visible: !persistentSettings.showPid && (warningLongPidTransfer || warningLongPidDescription) + text: qsTr("Long payment IDs are obsolete. \ + Long payment IDs were not encrypted on the blockchain and would harm your privacy. \ + If the party you're sending to still requires a long payment ID, please notify them.") + translationManager.emptyString; + visible: warningLongPidTransfer || paymentIdCheckbox.checked } MoneroComponents.WarningBox { @@ -769,6 +771,11 @@ Rectangle { root.sendButtonWarning = qsTr("Transaction information is incorrect.") + translationManager.emptyString; return false; } + + if (paymentIdWarningBox.visible) { + return false; + } + return true; } } diff --git a/pages/settings/SettingsLayout.qml b/pages/settings/SettingsLayout.qml index 8dc31f90..2874305a 100644 --- a/pages/settings/SettingsLayout.qml +++ b/pages/settings/SettingsLayout.qml @@ -69,15 +69,6 @@ Rectangle { } MoneroComponents.CheckBox { - id: showPidCheckBox - checked: persistentSettings.showPid - onClicked: { - persistentSettings.showPid = !persistentSettings.showPid - } - text: qsTr("Enable transfer with payment ID (OBSOLETE)") + translationManager.emptyString - } - - MoneroComponents.CheckBox { id: themeCheckbox checked: !MoneroComponents.Style.blackTheme text: qsTr("Light theme") + translationManager.emptyString |
