updated code to work with bitpay bch payments

This commit is contained in:
Kadir Sekha 2018-03-01 14:19:52 +05:00
commit 381a4e9f78
5 changed files with 51 additions and 12 deletions

View file

@ -34,7 +34,8 @@ angular.module('copayApp.services')
};
root.add = function(level, msg) {
msg = msg.replace('/xpriv.*/', 'xpriv[Hidden]');
msg = msg.replace('/xpriv.*/', '[...]');
msg = msg.replace('/walletPrivKey.*/', 'walletPrivKey:[...]');
logs.push({
timestamp: new Date().toISOString(),
level: level,

View file

@ -380,6 +380,12 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
paypro: payProDetails,
coin: coin,
};
// fee
if (payProDetails.requiredFeeRate) {
stateParams.requiredFeeRate = payProDetails.requiredFeeRate * 1024;
}
scannerService.pausePreview();
$state.go('tabs.send', {}, {
'reload': true,

View file

@ -27,7 +27,7 @@ angular.module('copayApp.services').factory('payproService',
payProUrl: uri,
}, function(err, paypro) {
if (!disableLoader) ongoingProcess.set('fetchingPayPro', false);
if (err) return cb(err);
if (err) return cb(gettextCatalog.getString('Could Not Fetch Payment: Check if it is still valid'));
else if (!paypro.verified) {
$log.warn('Failed to verify payment protocol signatures');
return cb(gettextCatalog.getString('Payment Protocol Invalid'));