Fix flow for bitpay card
This commit is contained in:
parent
046fd92522
commit
11a7e96c08
6 changed files with 42 additions and 48 deletions
|
|
@ -98,23 +98,6 @@ angular.module('copayApp.controllers').controller('bitpayCardController', functi
|
|||
});
|
||||
};
|
||||
|
||||
this.init = function() {
|
||||
$scope.dateRange = 'last30Days';
|
||||
|
||||
$scope.network = bitpayCardService.getEnvironment();
|
||||
$scope.wallets = profileService.getWallets({
|
||||
network: $scope.network,
|
||||
onlyComplete: true
|
||||
});
|
||||
|
||||
self.update();
|
||||
|
||||
wallet = $scope.wallets[0];
|
||||
|
||||
if (wallet && wallet.credentials.n > 1)
|
||||
self.isMultisigWallet = true;
|
||||
};
|
||||
|
||||
this.sendFunds = function() {
|
||||
if (lodash.isEmpty(wallet)) return;
|
||||
|
||||
|
|
@ -258,5 +241,22 @@ angular.module('copayApp.controllers').controller('bitpayCardController', functi
|
|||
return tx.description;
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data){
|
||||
$scope.dateRange = 'last30Days';
|
||||
|
||||
$scope.network = bitpayCardService.getEnvironment();
|
||||
$scope.wallets = profileService.getWallets({
|
||||
network: $scope.network,
|
||||
onlyComplete: true
|
||||
});
|
||||
|
||||
self.update();
|
||||
|
||||
wallet = $scope.wallets[0];
|
||||
|
||||
if (wallet && wallet.credentials.n > 1)
|
||||
self.isMultisigWallet = true;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
});
|
||||
}
|
||||
|
||||
$state.go('tabs.details', {
|
||||
$state.go('tabs.wallet', {
|
||||
walletId: wallet.credentials.walletId
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue