Merge branch 'master' into upstream-master

This commit is contained in:
Josh Harvey 2015-03-19 18:54:12 -04:00
commit 2a6c012e8d
5 changed files with 10 additions and 5 deletions

View file

@ -21,6 +21,8 @@ function poll(req, res) {
var rateRec = plugins.getDeviceRate(); var rateRec = plugins.getDeviceRate();
var balanceRec = plugins.getBalance(); var balanceRec = plugins.getBalance();
logger.debug('poll request from: %s', getFingerprint(req));
// `rateRec` and `balanceRec` are both objects, so there's no danger // `rateRec` and `balanceRec` are both objects, so there's no danger
// of misinterpreting rate or balance === 0 as 'Server initializing'. // of misinterpreting rate or balance === 0 as 'Server initializing'.
if (!rateRec || !balanceRec) { if (!rateRec || !balanceRec) {

View file

@ -29,7 +29,11 @@ module.exports = {
completeTransaction: function(tx, txHash) { completeTransaction: function(tx, txHash) {
calls.status = true; calls.status = true;
}, },
recordBill: function(fingerprint, trade) { } recordBill: function(fingerprint, trade) { },
addOutgoingTx: function(session, tx, cb) {
cb(null, {satoshis: tx.satoshis});
},
sentCoins: function() {}
}; };

View file

@ -6,5 +6,6 @@ module.exports = {
config: function config() {}, config: function config() {},
getAddressLastTx: function verifyUser() {}, getAddressLastTx: function verifyUser() {},
getTx: function verifyTransaction() {} getTx: function verifyTransaction() {},
checkAddress: function checkAddress() {}
}; };

View file

@ -42,5 +42,3 @@ module.exports.getBalanceCalls = function() {
module.exports.wasSendCalled = function() { module.exports.wasSendCalled = function() {
return calls.send; return calls.send;
}; };

View file

@ -209,7 +209,7 @@ describe('Plugins', function() {
/* jshint expr: true */ /* jshint expr: true */
response.should.be.an.Object; response.should.be.an.Object;
response.should.have.property('statusCode'); response.should.have.property('statusCode');
response.statusCode.should.equal(204); response.statusCode.should.equal(201);
/* jshint expr: false */ /* jshint expr: false */
done(); done();