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

@ -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;
}
}