poanetwork / poa-popa

DApp for proof of physical address (PoPA) attestation for validators of POA Network
https://popa.poa.network
GNU General Public License v3.0
24 stars 18 forks source link

(Improvement) There is no way to unlock a locked session #170

Closed phahulin closed 6 years ago

phahulin commented 6 years ago

https://github.com/poanetwork/poa-popa/blob/e259cec1fcfcfdff30a52bffb395d845c774855b/web-dapp/controllers/notifyRegTx.js#L47-L53

There is no way to unlock the session after it's locked. If some error happen during the workflow execution or web server crashes and is restarted, user won't be able to try again.

phahulin commented 6 years ago

if postcard was sent successfully, session key is removed

https://github.com/poanetwork/poa-popa/blob/master/web-dapp/routes/notify_reg_tx.js#L37-L40

so unlocking makes sense only if some error happened, probably we can add logic to unlock at the end of each request && on web-app restart (for uncaught exceptions).

Maybe there is a better way