mirror of https://github.com/BTCPrivate/copay.git
paypro: more notifications. comments. misc.
This commit is contained in:
parent
92c0b69d35
commit
6438de6bd2
|
@ -80,11 +80,11 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
var message = 'The transaction proposal has been created';
|
var message = 'The transaction proposal has been created';
|
||||||
if (merchantData) {
|
if (merchantData) {
|
||||||
if (merchantData.pr.ca) {
|
if (merchantData.pr.ca) {
|
||||||
message += '\nThis payment protocol transaction'
|
message += ' This payment protocol transaction'
|
||||||
+ ' has been verified through ' + merchantData.pr.ca + '.';
|
+ ' has been verified through ' + merchantData.pr.ca + '.';
|
||||||
}
|
}
|
||||||
message += '\nMessage from server: ' + merchantData.ack.memo;
|
message += ' Message from server: ' + merchantData.ack.memo;
|
||||||
message += '\nFor merchant: ' + merchantData.pr.pd.payment_url;
|
message += ' For merchant: ' + merchantData.pr.pd.payment_url;
|
||||||
}
|
}
|
||||||
notification.success('Success!', message);
|
notification.success('Success!', message);
|
||||||
$scope.loadTxs();
|
$scope.loadTxs();
|
||||||
|
@ -94,11 +94,11 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
var message = 'Transaction id: ' + txid;
|
var message = 'Transaction id: ' + txid;
|
||||||
if (merchantData) {
|
if (merchantData) {
|
||||||
if (merchantData.pr.ca) {
|
if (merchantData.pr.ca) {
|
||||||
message += '\nThis payment protocol transaction'
|
message += ' This payment protocol transaction'
|
||||||
+ ' has been verified through ' + merchantData.pr.ca + '.';
|
+ ' has been verified through ' + merchantData.pr.ca + '.';
|
||||||
}
|
}
|
||||||
message += '\nMessage from server: ' + merchantData.ack.memo;
|
message += ' Message from server: ' + merchantData.ack.memo;
|
||||||
message += '\nFor merchant: ' + merchantData.pr.pd.payment_url;
|
message += ' For merchant: ' + merchantData.pr.pd.payment_url;
|
||||||
}
|
}
|
||||||
notification.success('Transaction broadcast', message);
|
notification.success('Transaction broadcast', message);
|
||||||
} else {
|
} else {
|
||||||
|
@ -116,6 +116,8 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
uri = copay.HDPath.parseBitcoinURI(address);
|
uri = copay.HDPath.parseBitcoinURI(address);
|
||||||
} else if (address.indexOf('Merchant: ') === 0) {
|
} else if (address.indexOf('Merchant: ') === 0) {
|
||||||
uri = { merchant: address.split(/\s+/)[1] };
|
uri = { merchant: address.split(/\s+/)[1] };
|
||||||
|
} else if (/^https?:\/\//.test(address)) {
|
||||||
|
uri = { merchant: address };
|
||||||
}
|
}
|
||||||
|
|
||||||
if (uri && uri.merchant) {
|
if (uri && uri.merchant) {
|
||||||
|
|
|
@ -55,7 +55,7 @@ angular.module('copayApp.directives')
|
||||||
total = +total / config.unitToSatoshi;
|
total = +total / config.unitToSatoshi;
|
||||||
|
|
||||||
notification.info('Payment Request',
|
notification.info('Payment Request',
|
||||||
'Server is requesting ' + total + ' ' + config.unitName + '.\n'
|
'Server is requesting ' + total + ' ' + config.unitName + '.'
|
||||||
+ ' Message: ' + memo);
|
+ ' Message: ' + memo);
|
||||||
|
|
||||||
// XXX Pretty much all of this code accesses the raw DOM. It's
|
// XXX Pretty much all of this code accesses the raw DOM. It's
|
||||||
|
@ -122,8 +122,6 @@ angular.module('copayApp.directives')
|
||||||
sendall.attr('class').replace(' hidden', ''));
|
sendall.attr('class').replace(' hidden', ''));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO: Check paymentRequest expiration,
|
|
||||||
// delete if beyond expiration date.
|
|
||||||
};
|
};
|
||||||
scope.$watch('address',scope._resetPayPro);
|
scope.$watch('address',scope._resetPayPro);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue