11

I have created a dapp where the user can sign a contract using metamask. However, the account that gets the money send to keeps getting locked. Sure, I can manually unlock it, but this is really annoying. Is there any way to automate this, that it remains unlocked?


Seems like you can unlock it for as long as the geth instance is running using a 0 as duration parameter:

web3.personal.unlockAccount("address", "pass", 0);

Arko Elsenaar
  • 431
  • 4
  • 10
  • 4
    This might help for Geth: http://ethereum.stackexchange.com/questions/8418/lockout-time-for-ethereum-accounts One thing unclear in the question is that the receiving account does not need to be unlocked: only if it needs to sign a transaction. – eth Jan 04 '17 at 10:18
  • 1
    it is insecure to unlock an account permanently – Badr Bellaj Jan 05 '17 at 13:51
  • 1
    You should add an answer, and mark it correct, if your issue is resolved. – Tjaden Hess Jan 05 '17 at 22:45
  • For POA accounts, account should be unlocked all the time, otherwise account cannot seal the block and chain might be stop growing. It is difficult to keep track of is it unlocked or locked. So it is easier to keep it unlocked permanently on POA. @Badr Bellaj♦ – alper Jan 25 '18 at 08:37

1 Answers1

16

Seems like you can unlock it for as long as the geth instance is running using a 0 as duration parameter:

web3.personal.unlockAccount("address", "pass", 0);

Arko Elsenaar
  • 431
  • 4
  • 10