Ask user to unlock their account #23
Reference in New Issue
Block a user
Delete Branch "feature/22-handle_locked_metamask"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #22
This asks the user to unlock their account when loading the app.
Do you think this is good enough? I'm thinking it might be better to only ask when it's actually required (e.g. for voting), but I'm not sure how much more effort that would be.
Very cool! Works like a charm.
I edited the message a little bit, so it's easier to understand.
@@ -8,0 +8,4 @@beforeModel(transition) {const kredits = this.get('kredits');if (kredits.get('web3') && kredits.get('web3Provided')) {Wouldn't the second condition be enough here?
... feel free to merge, if the answer to my question is "no". ;)
The
confirmblocks the user from actually visiting the page, right?Wouldn't it be nicer to just display some kind of flash message which allows the user to still see the page?
@@ -8,0 +8,4 @@beforeModel(transition) {const kredits = this.get('kredits');if (kredits.get('web3') && kredits.get('web3Provided')) {No, because the
web3property actually checks if there is a user provided web3 when called for the first time. And it's not being called before this, so we have to access it first.That's why I used confirm. So the user can click "cancel" and still see the page. Also it's only shown if the user actually uses something like Metamask, but not if you don't have any extension installed.
Yes, clicking cancel works just fine, and one can also unlock the account while the dialog is open.
It'd be useful if core contributors would add the kredits labels themselves. It didn't occur to me that I had to check again, because you set it for your other PR. Not sure how to best solve this situation in the future.
Sorry, I'm late to the party but why don't you return a promise in the
modelhook that gets resolved onwindow.loadthat does all the setup work and returns theRSVP.hash?@fsmanuel Do you mean so that the rest can load in the background while unlocking accounts?
As this is merged already, a new PR would be most appreciated! 😉
Yep, that was the idea. Will see if I get free cycles for a PR.