aboutsummaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2021-09-09 16:54:36 -0400
committerluigi1111 <luigi1111w@gmail.com>2021-09-09 16:54:36 -0400
commit96762ebf0980bef4aee29beece585bc99ea02ec7 (patch)
tree3580bec1c6a76105829c0477059c1e3b5c2bd43a /pages
parent702d3b8ec1ce06cbe2300d65c1e3f608b5f8f361 (diff)
parentf327d20deb08d948829d2c2214af3cc3ac254456 (diff)
downloadmonzero-gui-96762ebf0980bef4aee29beece585bc99ea02ec7.tar.gz
monzero-gui-96762ebf0980bef4aee29beece585bc99ea02ec7.tar.xz
monzero-gui-96762ebf0980bef4aee29beece585bc99ea02ec7.zip
Merge pull request #3687
f327d20 qml: use libwalletqt make_uri function (selsta) dcc16a4 libwalletqt: add make_uri function (selsta)
Diffstat (limited to 'pages')
-rw-r--r--pages/Receive.qml9
-rw-r--r--pages/merchant/Merchant.qml6
2 files changed, 7 insertions, 8 deletions
diff --git a/pages/Receive.qml b/pages/Receive.qml
index 5e34f59e..b97c0657 100644
--- a/pages/Receive.qml
+++ b/pages/Receive.qml
@@ -63,12 +63,11 @@ Rectangle {
function generateQRCodeString() {
if (pageReceive.state == "PaymentRequest") {
- return TxUtils.makeQRCodeString(appWindow.current_address,
- (amountToReceiveXMR.text != "" && parseFloat(amountToReceiveXMR.text) != 0 ? amountToReceiveXMR.text : ""),
- (txDescriptionInput.text != "" ? txDescriptionInput.text : ""),
- (receiverNameInput.text != "" ? receiverNameInput.text : ""));
+ return walletManager.make_uri(appWindow.current_address,
+ walletManager.amountFromString(amountToReceiveXMR.text),
+ txDescriptionInput.text, receiverNameInput.text);
} else {
- return TxUtils.makeQRCodeString(appWindow.current_address);
+ return walletManager.make_uri(appWindow.current_address);
}
}
diff --git a/pages/merchant/Merchant.qml b/pages/merchant/Merchant.qml
index 3722a7a6..e17ed870 100644
--- a/pages/merchant/Merchant.qml
+++ b/pages/merchant/Merchant.qml
@@ -211,7 +211,7 @@ Item {
smooth: false
fillMode: Image.PreserveAspectFit
- source: "image://qrcode/" + TxUtils.makeQRCodeString(appWindow.current_address, amountToReceive.text)
+ source: "image://qrcode/" + walletManager.make_uri(appWindow.current_address, walletManager.amountFromString(amountToReceive.text))
MouseArea {
anchors.fill: parent
@@ -400,7 +400,7 @@ Item {
font.pixelSize: 12
font.bold: true
color: _color
- text: TxUtils.makeQRCodeString(appWindow.current_address, amountToReceive.text)
+ text: walletManager.make_uri(appWindow.current_address, walletManager.amountFromString(amountToReceive.text))
themeTransition: false
MouseArea {
@@ -685,7 +685,7 @@ Item {
selectExisting: false
nameFilters: ["Image (*.png)"]
onAccepted: {
- if(!walletManager.saveQrCode(TxUtils.makeQRCodeString(appWindow.current_address, amountToReceive.text), walletManager.urlToLocalPath(fileUrl))) {
+ if (!walletManager.saveQrCode(walletManager.make_uri(appWindow.current_address, walletManager.amountFromString(amountToReceive.text)), walletManager.urlToLocalPath(fileUrl))) {
console.log("Failed to save QrCode to file " + walletManager.urlToLocalPath(fileUrl) )
receivePageDialog.title = qsTr("Save QrCode") + translationManager.emptyString;
receivePageDialog.text = qsTr("Failed to save QrCode to ") + walletManager.urlToLocalPath(fileUrl) + translationManager.emptyString;