Skip to content
This repository has been archived by the owner on Oct 8, 2019. It is now read-only.

Commit

Permalink
fix(Login): catch sfox account error and log
Browse files Browse the repository at this point in the history
  • Loading branch information
plondon committed Apr 4, 2018
1 parent c484277 commit ddd5927
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions assets/js/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,15 +258,17 @@ function AppRouter ($stateProvider, $urlRouterProvider) {
let sfox = MyWallet.wallet && MyWallet.wallet.external && MyWallet.wallet.external.sfox;

return sfox && sfox.user && !sfox.profile
? $q.resolve().then(() => Exchange.fetchExchangeData(sfox))
? $q.resolve().then(() => Exchange.fetchExchangeData(sfox)).catch(console.log)
: $q.resolve();
},
accounts ($injector, $q) {
let MyWallet = $injector.has('MyWallet') && $injector.get('MyWallet');
let sfox = MyWallet.wallet && MyWallet.wallet.external && MyWallet.wallet.external.sfox;

return sfox && sfox.hasAccount
? $q.resolve([]).then(() => sfox.getBuyMethods()).then(methods => methods.ach.getAccounts())
? $q.resolve([])
.then(() => sfox.getBuyMethods()).catch(console.log)
.then(methods => methods.ach.getAccounts()).catch(console.log)
: $q.resolve([]);
}
}
Expand Down

1 comment on commit ddd5927

@Artic2019
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Мой

Please sign in to comment.