mirror of https://github.com/BTCPrivate/copay.git
Fix flow for bitpay card
This commit is contained in:
parent
046fd92522
commit
11a7e96c08
|
@ -1,19 +1,16 @@
|
|||
<ion-view>
|
||||
<ion-nav-bar class="bar-royal">
|
||||
<ion-nav-buttons side="primary">
|
||||
<button class="button button-clear" ui-sref="tabs.home">
|
||||
Close
|
||||
</button>
|
||||
</ion-nav-buttons>
|
||||
<ion-nav-back-button>
|
||||
</ion-nav-back-button>
|
||||
<ion-nav-title>BitPay Card</ion-nav-title>
|
||||
<ion-nav-buttons side="secondary">
|
||||
<button class="button button-clear" ui-sref="bitpayCard.preferences">
|
||||
<i class="icon ion-gear-b"></i>
|
||||
<button class="button back-button">
|
||||
<i class="icon ion-ios-search-strong"></i>
|
||||
</button>
|
||||
</ion-nav-buttons>
|
||||
</ion-nav-bar>
|
||||
|
||||
<ion-content ng-controller="bitpayCardController as bitpayCard" ng-init="bitpayCard.init()">
|
||||
<ion-content>
|
||||
|
||||
<div class="box-notification warning" ng-show="network == 'testnet'">
|
||||
Sandbox version. Only for testing purpose
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
</p>
|
||||
<i class="icon nav-item-arrow-right"></i>
|
||||
</a>
|
||||
<a ui-sref="bitpayCard.main"
|
||||
<a ui-sref="tabs.bitpayCard"
|
||||
ng-if="externalServices.BitpayCard"
|
||||
class="item item-icon-left item-big-icon-left item-icon-right">
|
||||
<i class="icon big-icon-svg">
|
||||
|
|
|
@ -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',
|
||||
}
|
||||
|
@ -842,23 +842,20 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
*
|
||||
*/
|
||||
|
||||
.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…
Reference in New Issue