shapeshift flow
This commit is contained in:
parent
01dd774fae
commit
aacc80ea21
10 changed files with 31 additions and 12 deletions
|
|
@ -506,8 +506,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$state.transitionTo('tabs.send.review', confirmData);
|
$state.transitionTo('tabs.send.review', confirmData);
|
||||||
}
|
|
||||||
$scope.useSendMax = null;
|
$scope.useSendMax = null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ function reviewController(addressbookService, configService, profileService, $lo
|
||||||
vm.primaryCurrency = '';
|
vm.primaryCurrency = '';
|
||||||
vm.secondaryAmount = '';
|
vm.secondaryAmount = '';
|
||||||
vm.secondaryCurrency = '';
|
vm.secondaryCurrency = '';
|
||||||
|
vm.thirdParty = false;
|
||||||
|
|
||||||
var config = null;
|
var config = null;
|
||||||
var coin = '';
|
var coin = '';
|
||||||
|
|
@ -57,6 +58,20 @@ function reviewController(addressbookService, configService, profileService, $lo
|
||||||
vm.origin.name = originWallet.name;
|
vm.origin.name = originWallet.name;
|
||||||
coin = originWallet.coin;
|
coin = originWallet.coin;
|
||||||
|
|
||||||
|
if (data.stateParams.thirdParty) {
|
||||||
|
vm.thirdParty = JSON.parse(data.stateParams.thirdParty); // Parse stringified JSON-object
|
||||||
|
if (vm.thirdParty) {
|
||||||
|
if (vm.thirdParty.id === 'shapeshift') {
|
||||||
|
if (!vm.thirdParty.data) {
|
||||||
|
vm.thirdParty.data = {};
|
||||||
|
}
|
||||||
|
vm.thirdParty.data['fromWalletId'] = vm.fromWalletId;
|
||||||
|
vm.fromWallet = profileService.getWallet(vm.fromWalletId);
|
||||||
|
vm.toWallet = profileService.getWallet(vm.toWalletId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
configService.get(function onConfig(err, configCache) {
|
configService.get(function onConfig(err, configCache) {
|
||||||
if (err) {
|
if (err) {
|
||||||
$log.err('Error getting config.', err);
|
$log.err('Error getting config.', err);
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.state('tabs.send.review', {
|
.state('tabs.send.review', {
|
||||||
url: '/review/:amount/:fromWalletId/:sendMax/:toAddr/:toWalletId',
|
url: '/review/:thirdParty/:amount/:fromWalletId/:sendMax/:toAddr/:toWalletId',
|
||||||
views: {
|
views: {
|
||||||
'tab-send@tabs': {
|
'tab-send@tabs': {
|
||||||
controller: 'reviewController',
|
controller: 'reviewController',
|
||||||
|
|
|
||||||
|
|
@ -254,6 +254,9 @@
|
||||||
padding: 0 6px 6px 6px;
|
padding: 0 6px 6px 6px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
&__max {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.send-amount-tool {
|
.send-amount-tool {
|
||||||
|
|
|
||||||
|
|
@ -16,3 +16,6 @@
|
||||||
@include button-shadow();
|
@include button-shadow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.header.shapeshift {
|
||||||
|
background: #243F5D;
|
||||||
|
}
|
||||||
|
|
@ -6,17 +6,17 @@
|
||||||
<ion-nav-back-button ng-click="vm.goBack()"></ion-nav-back-button>
|
<ion-nav-back-button ng-click="vm.goBack()"></ion-nav-back-button>
|
||||||
</ion-nav-bar>
|
</ion-nav-bar>
|
||||||
<ion-content scroll="false">
|
<ion-content scroll="false">
|
||||||
<div ng-if="vm.thirdParty && vm.thirdParty.id === 'shapeshift'" ng-include="'views/header-thirdparty.html'"></div>
|
<div ng-if="vm.thirdParty && vm.thirdParty.id === 'shapeshift'" ng-include="'views/thirdparty/shapeshift-header.html'"></div>
|
||||||
<div style="order: 0; position: relative;">
|
<div style="order: 0; position: relative;">
|
||||||
<div class="card item send-amount">
|
<div class="card item send-amount">
|
||||||
<div class="send-amount-header-footer">
|
<div class="send-amount-header-footer">
|
||||||
<span ng-if="vm.minAmount">Min: {{vm.minAmount}}</span> <span ng-if="vm.maxAmount">Max: {{vm.maxAmount}}</span>
|
<span class="send-amount-header-footer__min" ng-if="vm.minAmount">Min: {{vm.minAmount}}</span> <span class="send-amount-header-footer__max" ng-if="vm.maxAmount">Max: {{vm.maxAmount}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="send-amount-tool">
|
<div class="send-amount-tool">
|
||||||
<div class="send-amount-tool-input amount">
|
<div class="send-amount-tool-input amount">
|
||||||
<div class="primary-amount"
|
<div class="primary-amount"
|
||||||
ng-class="{long: vm.amount.length > 5, 'very-long': vm.amount.length > 10}">
|
ng-class="{long: vm.amount.length > 5, 'very-long': vm.amount.length > 10}">
|
||||||
<span class="primary-amount-display text-selectable">{{vm.amount}} {{vm.unit}}</span>
|
<span class="primary-amount-display text-selectable">{{vm.amount || '0'}} {{vm.unit}}</span>
|
||||||
</div>
|
</div>
|
||||||
<span ng-show="vm.globalResult">{{vm.globalResult}} {{vm.unit}}</span>
|
<span ng-show="vm.globalResult">{{vm.globalResult}} {{vm.unit}}</span>
|
||||||
<div class="alternative-amount">
|
<div class="alternative-amount">
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,8 @@
|
||||||
|
|
||||||
<ion-content class="padded-bottom-cta-with-summary bg-neutral"
|
<ion-content class="padded-bottom-cta-with-summary bg-neutral"
|
||||||
ng-init="memoExpanded = false">
|
ng-init="memoExpanded = false">
|
||||||
<div class="header">
|
<div ng-if="vm.thirdParty && vm.thirdParty.id === 'shapeshift'" ng-include="'views/thirdparty/shapeshift-header.html'"></div>
|
||||||
|
<div class="header" ng-class="vm.thirdParty.id">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p translate>You are sending</p>
|
<p translate>You are sending</p>
|
||||||
<p class="large">{{vm.primaryAmount}} {{vm.primaryCurrency}}</amount></p>
|
<p class="large">{{vm.primaryAmount}} {{vm.primaryCurrency}}</amount></p>
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,7 @@
|
||||||
</ion-nav-back-button>
|
</ion-nav-back-button>
|
||||||
</ion-nav-bar>
|
</ion-nav-bar>
|
||||||
<ion-content>
|
<ion-content>
|
||||||
<div class="send-header-wrapper shapeshift-banner">
|
<div ng-include="'views/thirdparty/shapeshift-header.html'"></div>
|
||||||
<img class="shapeshift-logo" src="img/shapeshiftlogo.svg"/>
|
|
||||||
</div>
|
|
||||||
<div class="list card empty-case">
|
<div class="list card empty-case">
|
||||||
<div>
|
<div>
|
||||||
<img class="swap-image" src="img/shapeshift_swap.png"/>
|
<img class="swap-image" src="img/shapeshift_swap.png"/>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<ion-nav-back-button ng-click="goBack()"></ion-nav-back-button>
|
<ion-nav-back-button ng-click="goBack()"></ion-nav-back-button>
|
||||||
</ion-nav-bar>
|
</ion-nav-bar>
|
||||||
<ion-content>
|
<ion-content>
|
||||||
<div ng-if="thirdParty && thirdParty.id === 'shapeshift'" ng-include="'views/header-thirdparty.html'"></div>
|
<div ng-if="thirdParty && thirdParty.id === 'shapeshift'" ng-include="'views/thirdparty/shapeshift-header.html'"></div>
|
||||||
<div class="header--request" ng-if="isPaymentRequest">
|
<div class="header--request" ng-if="isPaymentRequest">
|
||||||
<div class="header--request__title" translate>Paying</div>
|
<div class="header--request__title" translate>Paying</div>
|
||||||
<div class="header--request__amount" translate>$... USD</div>
|
<div class="header--request__amount" translate>$... USD</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue