aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-10-11 14:45:45 -0500
committerluigi1111 <luigi1111w@gmail.com>2018-10-11 14:45:45 -0500
commite7c73164a68ee265e74bfe6cbdfc3df94886414b (patch)
tree7c3f9093489f64513d3f5c2af346fd563d532ead
parent6ca3c1a23e8e978c3a1c5a155768965405bf2419 (diff)
parente21f8903eec7c64836314c1729473e81f83a4a05 (diff)
downloadmonzero-gui-e7c73164a68ee265e74bfe6cbdfc3df94886414b.tar.gz
monzero-gui-e7c73164a68ee265e74bfe6cbdfc3df94886414b.tar.xz
monzero-gui-e7c73164a68ee265e74bfe6cbdfc3df94886414b.zip
Merge pull request #1605
e21f890 Replacing the optional ring size slider in favor of static ring size 11 (skftn)
-rw-r--r--components/PrivacyLevel.qml2
-rw-r--r--components/PrivacyLevelSmall.qml2
-rw-r--r--main.qml3
-rw-r--r--pages/Transfer.qml75
4 files changed, 7 insertions, 75 deletions
diff --git a/components/PrivacyLevel.qml b/components/PrivacyLevel.qml
index 9cfe09d1..63c9b2ba 100644
--- a/components/PrivacyLevel.qml
+++ b/components/PrivacyLevel.qml
@@ -26,6 +26,8 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// @TODO: Remove component after wizard redesign
+
import QtQuick 2.0
Item {
diff --git a/components/PrivacyLevelSmall.qml b/components/PrivacyLevelSmall.qml
index 7b869044..4672f1ed 100644
--- a/components/PrivacyLevelSmall.qml
+++ b/components/PrivacyLevelSmall.qml
@@ -26,6 +26,8 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// @TODO: Remove component after wizard redesign
+
import QtQuick 2.0
Item {
diff --git a/main.qml b/main.qml
index 8d159cc8..534c1aca 100644
--- a/main.qml
+++ b/main.qml
@@ -635,9 +635,6 @@ ApplicationWindow {
transactionConfirmationPopup.text += qsTr("\n\nAmount: ") + walletManager.displayAmount(transaction.amount);
transactionConfirmationPopup.text += qsTr("\nFee: ") + walletManager.displayAmount(transaction.fee);
transactionConfirmationPopup.text += qsTr("\nRingsize: ") + (mixinCount + 1);
- if(mixinCount !== 6){
- transactionConfirmationPopup.text += qsTr("\n\nWARNING: non default ring size, which may harm your privacy. Default of 7 is recommended.");
- }
transactionConfirmationPopup.text += qsTr("\n\nNumber of transactions: ") + transaction.txCount
transactionConfirmationPopup.text += (transactionDescription === "" ? "" : (qsTr("\nDescription: ") + transactionDescription))
for (var i = 0; i < transaction.subaddrIndices.length; ++i){
diff --git a/pages/Transfer.qml b/pages/Transfer.qml
index 901b65e8..d14a21d8 100644
--- a/pages/Transfer.qml
+++ b/pages/Transfer.qml
@@ -44,21 +44,13 @@ Rectangle {
signal sweepUnmixableClicked()
color: "transparent"
+ property int mixin: 10 // (ring size 11)
property string warningContent: ""
property string startLinkText: qsTr("<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style><font size='2'> (</font><a href='#'>Start daemon</a><font size='2'>)</font>") + translationManager.emptyString
property bool showAdvanced: false
Clipboard { id: clipboard }
- function scaleValueToMixinCount(scaleValue) {
- var scaleToMixinCount = [6,7,8,9,10,11,12,13,14,16,18,20,22,25];
- if (scaleValue < scaleToMixinCount.length) {
- return scaleToMixinCount[scaleValue];
- } else {
- return 0;
- }
- }
-
function isValidOpenAliasAddress(address) {
address = address.trim()
var dot = address.indexOf('.')
@@ -76,14 +68,6 @@ Rectangle {
oaPopup.open()
}
- function updateMixin() {
- var fillLevel = (isMobile) ? privacyLevelItemSmall.fillLevel : privacyLevelItem.fillLevel
- var mixin = scaleValueToMixinCount(fillLevel)
- console.log("PrivacyLevel changed:" + fillLevel)
- console.log("mixin count: " + mixin)
- privacyLabel.text = qsTr("Ring size: %1").arg(mixin+1) + translationManager.emptyString
- }
-
function updateFromQrCode(address, payment_id, amount, tx_description, recipient_name) {
console.log("updateFromQrCode")
addressLine.text = address
@@ -353,9 +337,7 @@ Rectangle {
console.log("amount: " + amountLine.text)
addressLine.text = addressLine.text.trim()
paymentIdLine.text = paymentIdLine.text.trim()
- root.paymentClicked(addressLine.text, paymentIdLine.text, amountLine.text, scaleValueToMixinCount(privacyLevelItem.fillLevel),
- priority, descriptionLine.text)
-
+ root.paymentClicked(addressLine.text, paymentIdLine.text, amountLine.text, root.mixin, priority, descriptionLine.text)
}
}
}
@@ -408,57 +390,8 @@ Rectangle {
}
}
- Rectangle {
- visible: persistentSettings.transferShowAdvanced
- Layout.fillWidth: true
- height: 1
- color: Style.dividerColor
- opacity: Style.dividerOpacity
- Layout.bottomMargin: 30 * scaleRatio
- }
-
- RowLayout {
- visible: persistentSettings.transferShowAdvanced
- anchors.left: parent.left
- anchors.right: parent.right
- Layout.fillWidth: true
- Label {
- id: privacyLabel
- fontSize: 15
- text: ""
- }
-
- Label {
- id: costLabel
- fontSize: 14
- text: qsTr("Transaction cost") + translationManager.emptyString
- anchors.right: parent.right
- }
- }
-
- PrivacyLevel {
- visible: persistentSettings.transferShowAdvanced && !isMobile
- id: privacyLevelItem
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.rightMargin: 17 * scaleRatio
- onFillLevelChanged: updateMixin()
- }
-
- PrivacyLevelSmall {
- visible: persistentSettings.transferShowAdvanced && isMobile
- id: privacyLevelItemSmall
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.rightMargin: 17 * scaleRatio
- onFillLevelChanged: updateMixin()
- }
-
GridLayout {
visible: persistentSettings.transferShowAdvanced
- Layout.topMargin: 50 * scaleRatio
-
-
columns: (isMobile) ? 2 : 6
StandardButton {
@@ -485,8 +418,7 @@ Rectangle {
console.log("amount: " + amountLine.text)
addressLine.text = addressLine.text.trim()
paymentIdLine.text = paymentIdLine.text.trim()
- root.paymentClicked(addressLine.text, paymentIdLine.text, amountLine.text, scaleValueToMixinCount(privacyLevelItem.fillLevel),
- priority, descriptionLine.text)
+ root.paymentClicked(addressLine.text, paymentIdLine.text, amountLine.text, root.mixin, priority, descriptionLine.text)
}
}
@@ -669,7 +601,6 @@ Rectangle {
function onPageCompleted() {
console.log("transfer page loaded")
updateStatus();
- updateMixin();
updatePriorityDropdown()
}