diff --git a/lib/pool.js b/lib/pool.js index 212270a..f2084b9 100644 --- a/lib/pool.js +++ b/lib/pool.js @@ -236,11 +236,11 @@ function Miner(id, login, pass, ipAddress, startingDiff, messageSender, protoVer if (typeof(addressSplit[1]) !== 'undefined' && addressSplit[1].length === 64 && hexMatch.test(addressSplit[1])) { this.paymentID = addressSplit[1]; this.payout = this.address + "." + this.paymentID; - } else if (addressSplit[1] !== 'undefined') { - this.identifier = this.identifier === 'x' ? addressSplit[1] : pass_split[0]; + } else if (typeof(addressSplit[1]) !== 'undefined') { + this.identifier = pass_split[0] === 'x' ? addressSplit[1] : pass_split[0]; } if (typeof(addressSplit[2]) !== 'undefined') { - this.identifier = this.identifier === 'x' ? addressSplit[2] : pass_split[0]; + this.identifier = pass_split[0] === 'x' ? addressSplit[2] : pass_split[0]; } if (pass_split.length === 2) {