diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2017-12-17 12:24:35 -0600 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2017-12-17 12:24:35 -0600 |
| commit | fbd508781e7104800a36e73998a98029093bac4d (patch) | |
| tree | 3009cf6700df2c4abe927864c618551cf29b7cf2 /main.qml | |
| parent | 9d22b6ab4da8f310b629f989233c517eb51d301d (diff) | |
| parent | 5cda1f5ac1a4f567b7b87ad0c47f4d5594f67dae (diff) | |
| download | monzero-gui-fbd508781e7104800a36e73998a98029093bac4d.tar.gz monzero-gui-fbd508781e7104800a36e73998a98029093bac4d.tar.xz monzero-gui-fbd508781e7104800a36e73998a98029093bac4d.zip | |
Merge pull request #967
5cda1f5 Spend proof
Diffstat (limited to 'main.qml')
| -rw-r--r-- | main.qml | 24 |
1 files changed, 19 insertions, 5 deletions
@@ -764,7 +764,11 @@ ApplicationWindow { ", address: ", address, ", message: ", message); - var result = currentWallet.getTxProof(txid, address, message); + var result; + if (address.length > 0) + result = currentWallet.getTxProof(txid, address, message); + if (!result || result.startsWith("error|")) + result = currentWallet.getSpendProof(txid, message); informationPopup.title = qsTr("Payment proof") + translationManager.emptyString; if (result.startsWith("error|")) { var errorString = result.split("|")[1]; @@ -786,12 +790,16 @@ ApplicationWindow { ", message: ", message, ", signature: ", signature); - var result = currentWallet.checkTxProof(txid, address, message, signature); + var result; + if (address.length > 0) + result = currentWallet.checkTxProof(txid, address, message, signature); + else + result = currentWallet.checkSpendProof(txid, message, signature); var results = result.split("|"); - if (results.length == 5 && results[0] == "true") { - var good = results[1] == "true"; + if (address.length > 0 && results.length == 5 && results[0] === "true") { + var good = results[1] === "true"; var received = results[2]; - var in_pool = results[3] == "true"; + var in_pool = results[3] === "true"; var confirmations = results[4]; informationPopup.title = qsTr("Payment proof check") + translationManager.emptyString; @@ -812,6 +820,12 @@ ApplicationWindow { informationPopup.text = qsTr("This address received nothing"); } } + else if (results.length == 2 && results[0] === "true") { + var good = results[1] === "true"; + informationPopup.title = qsTr("Payment proof check") + translationManager.emptyString; + informationPopup.icon = good ? StandardIcon.Information : StandardIcon.Critical; + informationPopup.text = good ? qsTr("Good signature") : qsTr("Bad signature"); + } else { informationPopup.title = qsTr("Error") + translationManager.emptyString; informationPopup.text = currentWallet.errorString; |
