Skip to content

Commit 4e9879c

Browse files
committed
Warning added
1 parent 333549c commit 4e9879c

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

js/brainwallet.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,9 +769,17 @@
769769
}
770770

771771
function txSend() {
772+
773+
var txAddr = $('#txAddr').val();
774+
var address = TX.getAddress();
775+
776+
var r = '';
777+
if (txAddr != address)
778+
r += 'Warning! Address does not match private key.\n\n';
779+
772780
var tx = $('#txHex').val();
773781
url = 'http://bitsend.rowit.co.uk/?transaction=' + tx;
774-
url = prompt('Send transaction:', url);
782+
url = prompt(r + 'Send transaction:', url);
775783
if (url != null && url != "") {
776784
tx_fetch(url, txSent);
777785
}

js/tx.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ var TX = new function () {
8181
return new BigInteger(''+balance, 10);
8282
}
8383

84+
this.getAddress = function() {
85+
return eckey.getBitcoinAddress().toString();
86+
}
87+
8488
this.parseInputs = function(text, address) {
8589
try {
8690
var res = tx_parseBCI(text, address);

0 commit comments

Comments
 (0)