Block in application route if accountNeedsUnlock
The index route never gets invoked if you reload on the proposal page. That change makes sure we always initialize `ethProvider`.
This commit was merged in pull request #35.
This commit is contained in:
@@ -4,17 +4,6 @@ export default Ember.Route.extend({
|
||||
|
||||
kredits: Ember.inject.service(),
|
||||
|
||||
beforeModel(transition) {
|
||||
const kredits = this.get('kredits');
|
||||
return kredits.initEthProvider().then(() => {
|
||||
if (kredits.get('accountNeedsUnlock')) {
|
||||
if (confirm('It looks like you have an Ethereum wallet available. Please unlock your account.')) {
|
||||
transition.retry();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
model() {
|
||||
let newContributor = Ember.getOwner(this).lookup('model:contributor');
|
||||
newContributor.set('kind', 'person');
|
||||
|
||||
Reference in New Issue
Block a user