Update to work out the payment daemon. Not enough money transactions will flush from the queue automatically.

master
Alexander Blair 7 years ago
parent 7abe475b97
commit 263111c599

@ -296,6 +296,10 @@ let paymentQueue = async.queue(function (paymentDetails, callback) {
global.support.rpcWallet(transferFunc, paymentDetails, function (body) {
debug("Payment made: " + JSON.stringify(body));
if (body.hasOwnProperty('error')) {
if (body.error.message === "not enough money"){
console.error("Issue making payments, not enough money, will try later");
return callback(false);
} else {
console.error("Issue making payments" + JSON.stringify(body.error));
console.error("Will not make more payments until the payment daemon is restarted!");
//toAddress, subject, body
@ -304,6 +308,7 @@ let paymentQueue = async.queue(function (paymentDetails, callback) {
". Please investigate and restart the payment daemon as appropriate");
return;
}
}
if (paymentDetails.hasOwnProperty('payment_id')) {
console.log("Payment made to " + paymentDetails.destinations[0].address + " with PaymentID: " + paymentDetails.payment_id + " For: " + global.support.coinToDecimal(paymentDetails.destinations[0].amount) + " XMR with a " + global.support.coinToDecimal(body.result.fee) + " XMR Mining Fee");
return callback(body.result);

Loading…
Cancel
Save