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

@@ -1576,16 +1576,16 @@ Rectangle {
function getTxKey(hash, elem){
if (elem.parent.state != 'ready'){
var txKey = currentWallet.getTxKey(hash)
elem.parent.text = txKey ? txKey : '-';
elem.parent.state = 'ready';
currentWallet.getTxKeyAsync(hash, function(hash, txKey) {
elem.parent.text = txKey ? txKey : '-';
elem.parent.state = 'ready';
});
}
toClipboard(elem.parent.text);
}
function showTxDetails(hash, paymentId, destinations, subaddrAccount, subaddrIndex){
var tx_key = currentWallet.getTxKey(hash)
var tx_note = currentWallet.getUserNote(hash)
var rings = currentWallet.getRings(hash)
var address_label = subaddrIndex == 0 ? (qsTr("Primary address") + translationManager.emptyString) : currentWallet.getSubaddressLabel(subaddrAccount, subaddrIndex)
@@ -1593,10 +1593,12 @@ Rectangle {
if (rings)
rings = rings.replace(/\|/g, '\n')
informationPopup.title = qsTr("Transaction details") + translationManager.emptyString;
informationPopup.content = buildTxDetailsString(hash, paymentId, tx_key, tx_note, destinations, rings, address, address_label);
informationPopup.onCloseCallback = null
informationPopup.open();
currentWallet.getTxKeyAsync(hash, function(hash, tx_key) {
informationPopup.title = qsTr("Transaction details") + translationManager.emptyString;
informationPopup.content = buildTxDetailsString(hash, paymentId, tx_key, tx_note, destinations, rings, address, address_label);
informationPopup.onCloseCallback = null
informationPopup.open();
});
}
function showTxProof(hash, paymentId, destinations, subaddrAccount, subaddrIndex){