Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function unlockAccount(val) {
- var accounts = web3.eth.coinbase;
- var passphrase = val;
- if(passphrase !=null){
- web3.personal.unlockAccount(web3.eth.coinbase, passphrase,1000, function (error, result){
- if(error){
- var str =error.toString();
- if(str.includes("could not decrypt")){
- bootbox.hideAll();
- document.getElementById("loading").style.display = "none";
- document.getElementById("successAlert").style.display = "none";
- if(document.getElementById("dangerAlert")){
- document.getElementById("dangerAlert").style.display = "none";
- }
- bootbox.alert("Please enter the valid Passphrase.! ");
- }
- }
- });
- }
- }
- web3.personal.unlockAccount("0x..", "<pass>");
Add Comment
Please, Sign In to add comment