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';
|
||||
if (merchantData) {
|
||||
if (merchantData.pr.ca) {
|
||||
message += '\nThis payment protocol transaction'
|
||||
message += ' This payment protocol transaction'
|
||||
+ ' has been verified through ' + merchantData.pr.ca + '.';
|
||||
}
|
||||
message += '\nMessage from server: ' + merchantData.ack.memo;
|
||||
message += '\nFor merchant: ' + merchantData.pr.pd.payment_url;
|
||||
message += ' Message from server: ' + merchantData.ack.memo;
|
||||
message += ' For merchant: ' + merchantData.pr.pd.payment_url;
|
||||
}
|
||||
notification.success('Success!', message);
|
||||
$scope.loadTxs();
|
||||
|
@ -94,11 +94,11 @@ angular.module('copayApp.controllers').controller('SendController',
|
|||
var message = 'Transaction id: ' + txid;
|
||||
if (merchantData) {
|
||||
if (merchantData.pr.ca) {
|
||||
message += '\nThis payment protocol transaction'
|
||||
message += ' This payment protocol transaction'
|
||||
+ ' has been verified through ' + merchantData.pr.ca + '.';
|
||||
}
|
||||
message += '\nMessage from server: ' + merchantData.ack.memo;
|
||||
message += '\nFor merchant: ' + merchantData.pr.pd.payment_url;
|
||||
message += ' Message from server: ' + merchantData.ack.memo;
|
||||
message += ' For merchant: ' + merchantData.pr.pd.payment_url;
|
||||
}
|
||||
notification.success('Transaction broadcast', message);
|
||||
} else {
|
||||
|
@ -116,6 +116,8 @@ angular.module('copayApp.controllers').controller('SendController',
|
|||
uri = copay.HDPath.parseBitcoinURI(address);
|
||||
} else if (address.indexOf('Merchant: ') === 0) {
|
||||
uri = { merchant: address.split(/\s+/)[1] };
|
||||
} else if (/^https?:\/\//.test(address)) {
|
||||
uri = { merchant: address };
|
||||
}
|
||||
|
||||
if (uri && uri.merchant) {
|
||||
|
|
|
@ -55,8 +55,8 @@ angular.module('copayApp.directives')
|
|||
total = +total / config.unitToSatoshi;
|
||||
|
||||
notification.info('Payment Request',
|
||||
'Server is requesting ' + total + ' ' + config.unitName + '.\n'
|
||||
+ 'Message: ' + memo);
|
||||
'Server is requesting ' + total + ' ' + config.unitName + '.'
|
||||
+ ' Message: ' + memo);
|
||||
|
||||
// XXX Pretty much all of this code accesses the raw DOM. It's
|
||||
// very bad, there's probably a better, more angular-y way to
|
||||
|
@ -122,8 +122,6 @@ angular.module('copayApp.directives')
|
|||
sendall.attr('class').replace(' hidden', ''));
|
||||
}
|
||||
}
|
||||
// TODO: Check paymentRequest expiration,
|
||||
// delete if beyond expiration date.
|
||||
};
|
||||
scope.$watch('address',scope._resetPayPro);
|
||||
}
|
||||
|
@ -148,7 +146,7 @@ angular.module('copayApp.directives')
|
|||
|
||||
ctrl.$setValidity('validAddress', true);
|
||||
|
||||
return 'Merchant: '+ uri.merchant;
|
||||
return 'Merchant: ' + uri.merchant;
|
||||
};
|
||||
|
||||
ctrl.$parsers.unshift(validator);
|
||||
|
|
Loading…
Reference in New Issue