Ask user to unlock their account #23
+1
-1
@@ -11,7 +11,7 @@ export default Ember.Route.extend({
|
||||
if (kredits.get('web3') && kredits.get('web3Provided')) {
|
||||
|
|
||||
kredits.get('web3').eth.getAccounts((error, accounts) => {
|
||||
if (error || accounts.length === 0) {
|
||||
if (confirm('Please unlock your accounts')) {
|
||||
if (confirm('It looks like you have an Ethereum wallet available. Please unlock your account.')) {
|
||||
transition.retry();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user
Wouldn't the second condition be enough here?
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.