WIP -- handle state change requests
This commit is contained in:
parent
2400504827
commit
7c15ce0ae8
3 changed files with 32 additions and 2 deletions
|
|
@ -121,7 +121,7 @@ function loadOrConfigPlugin(pluginHandle, pluginType, currency,
|
|||
pluginHandle = loadPlugin(currentName, pluginConfig);
|
||||
currentlyUsedPlugins[pluginType] = currentName
|
||||
logger.debug('plugin(%s) loaded: %s', pluginType, pluginHandle.NAME ||
|
||||
currentName);
|
||||
currentName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -317,6 +317,17 @@ exports.trade = function trade(session, rawTrade, cb) {
|
|||
], cb);
|
||||
};
|
||||
|
||||
exports.stateChange = function stateChange(session, rec, cb) {
|
||||
var rec = {
|
||||
id: rec.uuid,
|
||||
fingerprint: session.fingerprint,
|
||||
eventType: 'stateChange',
|
||||
note: JSON.stringify({state: rec.state, sessionId: session.id}),
|
||||
deviceTime: rec.deviceTime
|
||||
}
|
||||
db.machineEvent(rec, cb)
|
||||
};
|
||||
|
||||
exports.sendBitcoins = function sendBitcoins(session, rawTx, cb) {
|
||||
executeTx(session, rawTx, 'machine', cb);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue