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

Commit

Permalink
fix(Deploy): inject Wallet to fix lazy-load race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Sjors committed Jun 29, 2016
1 parent 0555807 commit da81220
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion assets/js/controllers/authorizeApprove.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ angular
.module('walletApp')
.controller('AuthorizeApproveCtrl', AuthorizeApproveCtrl);

function AuthorizeApproveCtrl ($window, $scope, WalletTokenEndpoints, $stateParams, $state, Alerts, $translate, $rootScope, MyWalletHelpers) {
// Wallet is injected to ensure it's lazy-load before this controller is
// initialized. Otherwise $rootScope.rootUrl will be incorrect.
function AuthorizeApproveCtrl ($window, $scope, WalletTokenEndpoints, $stateParams, $state, Alerts, $translate, $rootScope, MyWalletHelpers, Wallet) {
$scope.success = false;

const success = (res) => {
Expand Down
4 changes: 3 additions & 1 deletion assets/js/controllers/resetTwoFactorToken.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ angular
.module('walletApp')
.controller('ResetTwoFactorTokenCtrl', ResetTwoFactorTokenCtrl);

function ResetTwoFactorTokenCtrl ($scope, WalletTokenEndpoints, $stateParams, $state, Alerts, $translate, $rootScope) {
// Wallet is injected to ensure it's lazy-load before this controller is
// initialized. Otherwise $rootScope.rootUrl will be incorrect.
function ResetTwoFactorTokenCtrl ($scope, WalletTokenEndpoints, $stateParams, $state, Alerts, $translate, $rootScope, Wallet) {
Alerts.clear();

const success = (obj) => {
Expand Down

0 comments on commit da81220

Please sign in to comment.