paypro: refactor cached payment requests.
This commit is contained in:
parent
decd981bce
commit
2aee44f31c
2 changed files with 20 additions and 19 deletions
|
|
@ -94,18 +94,10 @@ angular.module('copayApp.controllers').controller('SendController',
|
|||
&& copay.HDPath.parseBitcoinURI(address);
|
||||
|
||||
if (uri && uri.merchant) {
|
||||
var req = w.paymentRequests[uri.merchant];
|
||||
if (req) {
|
||||
if (commentText) {
|
||||
req.options.memo = commentText;
|
||||
}
|
||||
w.receivePaymentRequest(req.options, req.pr, done);
|
||||
} else {
|
||||
w.createPaymentTx({
|
||||
uri: uri.merchant,
|
||||
memo: commentText
|
||||
}, done);
|
||||
}
|
||||
w.createPaymentTx({
|
||||
uri: uri.merchant,
|
||||
memo: commentText
|
||||
}, done);
|
||||
} else {
|
||||
w.createTx(address, amount, commentText, done);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue