Erase priv key box after transaction, truncate address in confirmation dialog
This commit is contained in:
parent
0d0e68cdec
commit
0ec764142c
@ -104,7 +104,7 @@ function getUXTOData(walletaddress, successCallback, errorCallback) {
|
||||
});
|
||||
}
|
||||
|
||||
function sendCoins(privatekey, fromaddress, toaddress, satoshis) {
|
||||
function sendCoins(privatekey, fromaddress, toaddress, amount) {
|
||||
var progressdialog = app.dialog.progress("Querying blockchain...", 25);
|
||||
getUXTOData(fromaddress, function (success) {
|
||||
progressdialog.setProgress(50);
|
||||
@ -119,6 +119,7 @@ function sendCoins(privatekey, fromaddress, toaddress, satoshis) {
|
||||
return;
|
||||
}
|
||||
var bitcore = null;
|
||||
var satoshis = amount * 100000000;
|
||||
switch (success.currency) {
|
||||
case "DOGE":
|
||||
bitcore = require("bitcore-lib-doge");
|
||||
@ -144,7 +145,8 @@ function sendCoins(privatekey, fromaddress, toaddress, satoshis) {
|
||||
}, function (resp) {
|
||||
if (resp.status == "OK") {
|
||||
app.dialog.close();
|
||||
app.dialog.alert("Sent " + (satoshis / 100000000) + " " + success.currency + " to " + toaddress, "Success!");
|
||||
app.dialog.alert("Sent " + amount + " " + success.currency + " to " + toaddress.substring(0, 5) + "..." + toaddress.substring(toaddress.length - 5, 999), "Success!");
|
||||
$('#walletPrivateKey').val(""); // clear private key input box
|
||||
return;
|
||||
} else {
|
||||
app.dialog.close();
|
||||
@ -194,7 +196,7 @@ function walletGUISendCoins() {
|
||||
app.dialog.alert("The recipient's wallet address doesn't look right. Check it and try again.", "Error");
|
||||
return;
|
||||
}
|
||||
sendCoins($('#walletPrivateKey').val(), $('#walletFromAddress').val(), $('#walletToAddress').val(), $('#transactionAmount').val() * 100000000);
|
||||
sendCoins($('#walletPrivateKey').val(), $('#walletFromAddress').val(), $('#walletToAddress').val(), parseFloat($('#transactionAmount').val()));
|
||||
}
|
||||
|
||||
function displayWalletBalance(address) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user