finishing buy flow
This commit is contained in:
parent
090b05984b
commit
f60ee6f4fd
3 changed files with 50 additions and 9 deletions
|
|
@ -448,7 +448,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
popupService.showAlert(gettextCatalog.getString('Error'), err);
|
popupService.showAlert(gettextCatalog.getString('Error'), err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$scope.success = data;
|
$scope.sendStatus = 'success';
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$scope.$digest();
|
$scope.$digest();
|
||||||
});
|
});
|
||||||
|
|
@ -536,6 +536,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
var previousView = $ionicHistory.viewHistory().backView && $ionicHistory.viewHistory().backView.stateName;
|
var previousView = $ionicHistory.viewHistory().backView && $ionicHistory.viewHistory().backView.stateName;
|
||||||
var fromBitPayCard = previousView.match(/tabs.bitpayCard/) ? true : false;
|
var fromBitPayCard = previousView.match(/tabs.bitpayCard/) ? true : false;
|
||||||
var fromAmazon = previousView.match(/tabs.giftcards.amazon/) ? true : false;
|
var fromAmazon = previousView.match(/tabs.giftcards.amazon/) ? true : false;
|
||||||
|
var fromGlidera = previousView.match(/tabs.buyandsell.glidera/) ? true : false;
|
||||||
|
|
||||||
$ionicHistory.nextViewOptions({
|
$ionicHistory.nextViewOptions({
|
||||||
disableAnimate: true
|
disableAnimate: true
|
||||||
|
|
@ -560,6 +561,15 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
cardClaimCode: $scope.amazonGiftCard ? $scope.amazonGiftCard.claimCode : null
|
cardClaimCode: $scope.amazonGiftCard ? $scope.amazonGiftCard.claimCode : null
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
} else if (fromGlidera) {
|
||||||
|
$ionicHistory.nextViewOptions({
|
||||||
|
disableAnimate: true,
|
||||||
|
historyRoot: true
|
||||||
|
});
|
||||||
|
$ionicHistory.clearHistory();
|
||||||
|
$state.go('tabs.home').then(function() {
|
||||||
|
$state.transitionTo('tabs.buyandsell.glidera');
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
$ionicHistory.nextViewOptions({
|
$ionicHistory.nextViewOptions({
|
||||||
disableAnimate: true,
|
disableAnimate: true,
|
||||||
|
|
|
||||||
|
|
@ -47,10 +47,21 @@
|
||||||
color: #9B9B9B;
|
color: #9B9B9B;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.buy-price {
|
.glidera-explanation {
|
||||||
bottom: 20px;
|
padding: 0 1rem;
|
||||||
position: absolute;
|
margin: 1rem 0;
|
||||||
color: $light-gray;
|
white-space: normal;
|
||||||
|
}
|
||||||
|
.glidera-description {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 15px;
|
||||||
|
color: $mid-gray;
|
||||||
|
margin: 1rem 0;
|
||||||
|
a {
|
||||||
|
font-weight: bold;
|
||||||
|
cursor: pointer;
|
||||||
|
cursor: hand;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.item {
|
.item {
|
||||||
|
|
@ -250,4 +261,12 @@
|
||||||
color: rgba(58, 58, 58, .6);
|
color: rgba(58, 58, 58, .6);
|
||||||
margin-bottom: 1.5rem;
|
margin-bottom: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.glidera-success {
|
||||||
|
margin-top: 15px;
|
||||||
|
span {
|
||||||
|
font-size: 15px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,17 @@
|
||||||
<div class="amount">{{displayAmount || '...'}} <span class="unit">{{displayUnit}}</span></div>
|
<div class="amount">{{displayAmount || '...'}} <span class="unit">{{displayUnit}}</span></div>
|
||||||
<div class="alternative">{{alternativeAmountStr || '...'}}</div>
|
<div class="alternative">{{alternativeAmountStr || '...'}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div ng-show="isGlidera" class="buy-price">
|
<div ng-show="isGlidera">
|
||||||
<div ng-show="buyPrice.qty">
|
<div class="glidera-explanation">
|
||||||
Buy {{buyPrice.subtotal|currency:'':2}} {{buyPrice.currency}} in Bitcoin at {{buyPrice.price}} {{buyPrice.currency}}/BTC
|
<div class="glidera-description" ng-show="buyPrice.qty">
|
||||||
|
Buy {{buyPrice.subtotal|currency:'':2}} {{buyPrice.currency}} in Bitcoin at {{buyPrice.price}} {{buyPrice.currency}}/BTC
|
||||||
|
</div>
|
||||||
|
<div class="glidera-description">
|
||||||
|
Fiat will be immediately withdrawn from your bank account
|
||||||
|
</div>
|
||||||
|
<div class="glidera-description">
|
||||||
|
Each bitcoin wallet can generate billions of addresses from your 12-word backup. A new address is automatically generated and shown each time your recive a payment
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -66,7 +74,7 @@
|
||||||
</div>
|
</div>
|
||||||
<i class="icon bp-arrow-right"></i>
|
<i class="icon bp-arrow-right"></i>
|
||||||
</a>
|
</a>
|
||||||
<a class="item single-line item-icon-right" ng-if="!insufficientFunds && !noMatchingWallet" ng-click="showDescriptionPopup()">
|
<a class="item single-line item-icon-right" ng-if="!insufficientFunds && !noMatchingWallet && !isGlidera" ng-click="showDescriptionPopup()">
|
||||||
<span class="label" translate>Add Memo</span>
|
<span class="label" translate>Add Memo</span>
|
||||||
<span class="item-note m10l">
|
<span class="item-note m10l">
|
||||||
{{description}}
|
{{description}}
|
||||||
|
|
@ -106,6 +114,10 @@
|
||||||
slide-success-hide-on-confirm="true">
|
slide-success-hide-on-confirm="true">
|
||||||
<span ng-hide="wallet.m > 1">Payment Sent</span>
|
<span ng-hide="wallet.m > 1">Payment Sent</span>
|
||||||
<span ng-show="wallet.m > 1">Proposal Created</span>
|
<span ng-show="wallet.m > 1">Proposal Created</span>
|
||||||
|
<div ng-show="isGlidera" class="glidera-success">
|
||||||
|
<span>A transfer has been initiated from your bank account</span>
|
||||||
|
<span>Your bitcoins should arrive to your wallet in 2-4 business day</span>
|
||||||
|
</div>
|
||||||
</slide-to-accept-success>
|
</slide-to-accept-success>
|
||||||
|
|
||||||
<wallet-selector
|
<wallet-selector
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue