log error synchronously so we get a trace when pinPads has no callback

This commit is contained in:
ansuz 2017-08-28 11:47:01 +02:00
parent 841e3af8da
commit 5c2b58e703

View File

@ -811,6 +811,9 @@ define([
common.pinPads = function (pads, cb) { common.pinPads = function (pads, cb) {
if (!pinsReady()) { return void cb ('RPC_NOT_READY'); } if (!pinsReady()) { return void cb ('RPC_NOT_READY'); }
if (typeof(cb) !== 'function') {
console.error('expected a callback');
}
rpc.pin(pads, function (e, hash) { rpc.pin(pads, function (e, hash) {
if (e) { return void cb(e); } if (e) { return void cb(e); }