get_tx_key, get_tx_proof, tx_spend_proof async

This commit is contained in:
Dusan Klinec
2019-06-18 13:15:39 +02:00
parent 8d49ad9ba4
commit 6d03d63c88
4 changed files with 85 additions and 12 deletions

View File

@@ -1003,11 +1003,21 @@ ApplicationWindow {
", address: ", address,
", message: ", message);
var result;
function spendProofFallback(txid, result){
if (!result || result.indexOf("error|") === 0) {
currentWallet.getSpendProofAsync(txid, message, txProofComputed);
} else {
txProofComputed(txid, result);
}
}
if (address.length > 0)
result = currentWallet.getTxProof(txid, address, message);
if (!result || result.indexOf("error|") === 0)
result = currentWallet.getSpendProof(txid, message);
currentWallet.getTxProofAsync(txid, address, message, spendProofFallback);
else
spendProofFallback(txid, null);
}
function txProofComputed(txid, result){
informationPopup.title = qsTr("Payment proof") + translationManager.emptyString;
if (result.indexOf("error|") === 0) {
var errorString = result.split("|")[1];