header bitpay on the wallet selector, incoming data fix, clean a bit

This commit is contained in:
Jean-Baptiste Dominguez 2018-08-06 22:12:33 +09:00
commit cc213956d0
9 changed files with 64 additions and 14 deletions

View file

@ -264,9 +264,30 @@ div.onboarding-topic {
height: 5em; height: 5em;
} }
.shapeshift-banner {
background: url(../img/shapeshiftbg.jpg) center center no-repeat #28394d;
padding: 10px;
box-shadow: 0px 5px 10px 0px #cccccc;
height: 5em;
}
.bitpay-banner {
background: center center no-repeat #1A3A8B;
padding: 10px;
box-shadow: 0px 5px 10px 0px #cccccc;
height: 5em;
}
.bitpay-logo {
display: block;
max-height: 100%;
width: 100%;
height: 4em;
}
.shapeshift-logo { .shapeshift-logo {
display: block; display: block;
float: left; float: left;
max-height: 100%; max-height: 100%;
max-width: 100%; max-width: 100%;
} }

View file

@ -106,12 +106,7 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu
} }
function handleThirdPartyIfBip70PaymentProtocol() { function handleThirdPartyIfBip70PaymentProtocol() {
if ($scope.thirdParty.id === 'bip70PaymentProtocol') { if ($scope.thirdParty.id === 'bitpay') {
requestedSatoshis = $scope.thirdParty.details.amount;
$scope.coin = $scope.thirdParty.coin;
$scope.requestAmount = unitsFromSatoshis * requestedSatoshis;
$scope.params.amount = requestedSatoshis;
$scope.params.toAddr = $scope.thirdParty.details.toAddress;
console.log('paypro details:', $scope.thirdParty.details); console.log('paypro details:', $scope.thirdParty.details);
} }
} }

View file

@ -405,6 +405,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
return { return {
amount: payProData.outputs[0].amount, amount: payProData.outputs[0].amount,
caTrusted: true, caTrusted: true,
name: 'bitpay',
domain: 'bitpay.com', domain: 'bitpay.com',
expires: Math.floor(new Date(payProData.expires).getTime() / 1000), expires: Math.floor(new Date(payProData.expires).getTime() / 1000),
memo: payProData.memo, memo: payProData.memo,
@ -421,13 +422,13 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
function handlePayPro(payProDetails, coin) { function handlePayPro(payProDetails, coin) {
var thirdPartyData = { var thirdPartyData = {
id: 'bip70PaymentProtocol', id: payProDetails.name,
coin: coin,
details: payProDetails details: payProDetails
}; };
var stateParams = { var stateParams = {
amount: payProDetails.amount, amount: payProDetails.amount,
toAddress: payProDetails.toAddress, toAddr: payProDetails.toAddress,
coin: coin,
thirdParty: JSON.stringify(thirdPartyData) thirdParty: JSON.stringify(thirdPartyData)
}; };

View file

@ -11,7 +11,7 @@
bottom: 92px; bottom: 92px;
} }
.shapeshift-banner { .shapeshift-banner, .bitpay-banner {
box-shadow: none; box-shadow: none;
} }
} }

View file

@ -314,9 +314,23 @@ div.slide-success__background.fill-screen {
height: 5em; height: 5em;
} }
.bitpay-banner {
background: #1A3A8B;
padding: 10px;
box-shadow: 0px 5px 10px 0px #cccccc;
height: 5em;
}
.bitpay-logo {
display: block;
max-height: 100%;
width: 100%;
height: 4em;
}
.shapeshift-logo { .shapeshift-logo {
display: block; display: block;
float: left; float: left;
max-height: 100%; max-height: 100%;
max-width: 100%; max-width: 100%;
} }

View file

@ -15262,7 +15262,7 @@ log-options #check-bar .checkbox-icon {
#view-review .fee-summary { #view-review .fee-summary {
position: absolute; position: absolute;
bottom: 92px; } bottom: 92px; }
#view-review .shapeshift-banner { #view-review .shapeshift-banner, #view-review .bitpay-banner {
box-shadow: none; } box-shadow: none; }
.gravatar { .gravatar {
@ -15325,8 +15325,10 @@ ion-content.padded-bottom-cta-with-summary {
.header { .header {
padding: 29px 12px 61px; padding: 29px 12px 61px;
background-color: #FAB915; background-color: #fab915;
color: #FFFFFF; } color: #FFFFFF; }
.header.btc {
background-color: #535353; }
.header .title { .header .title {
font-size: 18px; font-size: 18px;
font-weight: 400; font-weight: 400;

13
www/img/bitpay_banner.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.8 KiB

View file

@ -0,0 +1,3 @@
<div class="send-header-wrapper bitpay-banner">
<img class="bitpay-logo" src="img/bitpay_banner.svg"/>
</div>

View file

@ -5,6 +5,7 @@
</ion-nav-bar> </ion-nav-bar>
<ion-content> <ion-content>
<div ng-if="thirdParty && thirdParty.id === 'shapeshift'" ng-include="'views/thirdparty/shapeshift-header.html'"></div> <div ng-if="thirdParty && thirdParty.id === 'shapeshift'" ng-include="'views/thirdparty/shapeshift-header.html'"></div>
<div ng-if="thirdParty && thirdParty.id === 'bitpay'" ng-include="'views/thirdparty/bitpay-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>{{requestAmount}} {{requestCurrency}}</div> <div class="header--request__amount" translate>{{requestAmount}} {{requestCurrency}}</div>