Update paymentProcessor.js
Trim address of space that somehow get in the beginning or end.
This commit is contained in:
parent
24a84c6380
commit
b16990e18a
|
@ -985,7 +985,7 @@ function SetupForPool(logger, poolOptions, setupFinished){
|
||||||
worker.reward = worker.reward || 0;
|
worker.reward = worker.reward || 0;
|
||||||
// get miner payout totals
|
// get miner payout totals
|
||||||
var toSendSatoshis = Math.round((worker.balance + worker.reward) * (1 - withholdPercent));
|
var toSendSatoshis = Math.round((worker.balance + worker.reward) * (1 - withholdPercent));
|
||||||
var address = worker.address = (worker.address || getProperAddress(w.split('.')[0]));
|
var address = worker.address = (worker.address || getProperAddress(w.split('.')[0])).trim();
|
||||||
if (minerTotals[address] != null && minerTotals[address] > 0) {
|
if (minerTotals[address] != null && minerTotals[address] > 0) {
|
||||||
minerTotals[address] += toSendSatoshis;
|
minerTotals[address] += toSendSatoshis;
|
||||||
} else {
|
} else {
|
||||||
|
@ -998,7 +998,7 @@ function SetupForPool(logger, poolOptions, setupFinished){
|
||||||
worker.balance = worker.balance || 0;
|
worker.balance = worker.balance || 0;
|
||||||
worker.reward = worker.reward || 0;
|
worker.reward = worker.reward || 0;
|
||||||
var toSendSatoshis = Math.round((worker.balance + worker.reward) * (1 - withholdPercent));
|
var toSendSatoshis = Math.round((worker.balance + worker.reward) * (1 - withholdPercent));
|
||||||
var address = worker.address = (worker.address || getProperAddress(w.split('.')[0]));
|
var address = worker.address = (worker.address || getProperAddress(w.split('.')[0])).trim();
|
||||||
// if miners total is enough, go ahead and add this worker balance
|
// if miners total is enough, go ahead and add this worker balance
|
||||||
if (minerTotals[address] >= minPaymentSatoshis) {
|
if (minerTotals[address] >= minPaymentSatoshis) {
|
||||||
totalSent += toSendSatoshis;
|
totalSent += toSendSatoshis;
|
||||||
|
|
Loading…
Reference in New Issue