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;
}
.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 {
display: block;
float: left;
max-height: 100%;
max-width: 100%;
max-width: 100%;
}

View file

@ -106,12 +106,7 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu
}
function handleThirdPartyIfBip70PaymentProtocol() {
if ($scope.thirdParty.id === 'bip70PaymentProtocol') {
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;
if ($scope.thirdParty.id === 'bitpay') {
console.log('paypro details:', $scope.thirdParty.details);
}
}

View file

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

View file

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

View file

@ -314,9 +314,23 @@ div.slide-success__background.fill-screen {
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 {
display: block;
float: left;
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 {
position: absolute;
bottom: 92px; }
#view-review .shapeshift-banner {
#view-review .shapeshift-banner, #view-review .bitpay-banner {
box-shadow: none; }
.gravatar {
@ -15325,8 +15325,10 @@ ion-content.padded-bottom-cta-with-summary {
.header {
padding: 29px 12px 61px;
background-color: #FAB915;
background-color: #fab915;
color: #FFFFFF; }
.header.btc {
background-color: #535353; }
.header .title {
font-size: 18px;
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-content>
<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__title" translate>Paying</div>
<div class="header--request__amount" translate>{{requestAmount}} {{requestCurrency}}</div>