forked from dsias/blockchain.info
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wallet-forgot-password.js
32 lines (24 loc) · 1008 Bytes
/
wallet-forgot-password.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
$(document).ready(function() {
$('input[name="mnemonic"]').change(function() {
var container = $('#mnemonic-result-container');
var error_container = $('#mnemonic-result-error');
container.hide();
error_container.hide();
container.find('.guid-result-container').hide();
var val = $.trim($(this).val());
if (val.length == 0)
return;
mn_decode_pass(val, function(obj) {
container.show();
if (obj.guid) {
container.find('.guid-result-container').show();
container.find('.guid-result').html('<a href="https://blockchain.info/wallet/'+obj.guid+'" target="new">https://blockchain.info/wallet/'+obj.guid+'</a>');
} else {
container.find('.guid-result-container').hide();
}
container.find('.password-result').val(obj.password);
}, function(e) {
error_container.show().text(e);
});
});
});