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
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -150,10 +150,10 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
*
|
||||
*/
|
||||
|
||||
.state('tabs.details', {
|
||||
url: '/details/{walletId}/{fromOnboarding}',
|
||||
.state('tabs.wallet', {
|
||||
url: '/wallet/{walletId}/{fromOnboarding}',
|
||||
views: {
|
||||
'tab-home': {
|
||||
'tab-home@tabs': {
|
||||
controller: 'walletDetailsController',
|
||||
templateUrl: 'views/walletDetails.html'
|
||||
}
|
||||
|
|
@ -166,7 +166,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
.state('tabs.activity', {
|
||||
url: '/activity',
|
||||
views: {
|
||||
'tab-home': {
|
||||
'tab-home@tabs': {
|
||||
controller: 'activityController',
|
||||
templateUrl: 'views/activity.html',
|
||||
}
|
||||
|
|
@ -175,7 +175,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
.state('tabs.proposals', {
|
||||
url: '/proposals',
|
||||
views: {
|
||||
'tab-home': {
|
||||
'tab-home@tabs': {
|
||||
controller: 'proposalsController',
|
||||
templateUrl: 'views/proposals.html',
|
||||
}
|
||||
|
|
@ -836,29 +836,26 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
}
|
||||
})
|
||||
|
||||
/*
|
||||
*
|
||||
* BitPay Card
|
||||
*
|
||||
*/
|
||||
/*
|
||||
*
|
||||
* BitPay Card
|
||||
*
|
||||
*/
|
||||
|
||||
.state('bitpayCard', {
|
||||
url: '/bitpayCard',
|
||||
abstract: true,
|
||||
template: '<ion-nav-view name="bitpayCard"></ion-nav-view>'
|
||||
})
|
||||
.state('bitpayCard.main', {
|
||||
url: '/main',
|
||||
.state('tabs.bitpayCard', {
|
||||
url: '/bitpay-card',
|
||||
views: {
|
||||
'bitpayCard': {
|
||||
'tab-home@tabs': {
|
||||
controller: 'bitpayCardController',
|
||||
controllerAs: 'bitpayCard',
|
||||
templateUrl: 'views/bitpayCard.html'
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('bitpayCard.preferences', {
|
||||
.state('tabs.bitpayCard.preferences', {
|
||||
url: '/preferences',
|
||||
views: {
|
||||
'bitpayCard': {
|
||||
'tab-home@tabs': {
|
||||
templateUrl: 'views/preferencesBitpayCard.html'
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -833,7 +833,7 @@ angular.module('copayApp.services')
|
|||
|
||||
x.action = function() {
|
||||
// TODO?
|
||||
// $state.go('tabs.details', {
|
||||
// $state.go('tabs.wallet', {
|
||||
// walletId: x.walletId,
|
||||
// txpId: x.txpId,
|
||||
// txid: x.txid,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue