refactor(tx): transaction(s) changed to tx(s)
This commit is contained in:
parent
55abaa1bb9
commit
5a78376ad5
3 changed files with 16 additions and 14 deletions
|
|
@ -203,7 +203,7 @@ function _sendBitcoins(tx, callback) {
|
|||
);
|
||||
}
|
||||
|
||||
function executeTransaction(deviceFingerprint, txId, autoTriggered, cb) {
|
||||
function executeTx(deviceFingerprint, txId, autoTriggered, cb) {
|
||||
cb = typeof cb === 'function' ? cb : function() {};
|
||||
|
||||
clearSession(deviceFingerprint);
|
||||
|
|
@ -220,7 +220,7 @@ function executeTransaction(deviceFingerprint, txId, autoTriggered, cb) {
|
|||
return cb(null, {statusCode: 304}); // Not Modified
|
||||
}
|
||||
|
||||
db.summonTransaction(deviceFingerprint, tx, function(err, txInfo) {
|
||||
db.summonTx(deviceFingerprint, tx, function(err, txInfo) {
|
||||
if (err) return cb(err);
|
||||
|
||||
// actual sending
|
||||
|
|
@ -255,7 +255,7 @@ exports.trade = function trade(rawTrade, deviceFingerprint, cb) {
|
|||
sessions[deviceFingerprint] = {
|
||||
timestamp: Date.now(),
|
||||
reaper: setTimeout(function() {
|
||||
executeTransaction(deviceFingerprint, rawTrade.txId, true);
|
||||
executeTx(deviceFingerprint, rawTrade.txId, true);
|
||||
}, SESSION_TIMEOUT)
|
||||
};
|
||||
}
|
||||
|
|
@ -273,7 +273,7 @@ exports.trade = function trade(rawTrade, deviceFingerprint, cb) {
|
|||
};
|
||||
|
||||
exports.sendBitcoins = function sendBitcoins(deviceFingerprint, rawTx, callback) {
|
||||
executeTransaction(deviceFingerprint, rawTx.txId, false, callback);
|
||||
executeTx(deviceFingerprint, rawTx.txId, false, callback);
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -474,6 +474,6 @@ exports.verifyUser = function verifyUser(data, callback) {
|
|||
idVerifierPlugin.verifyUser(data, callback);
|
||||
};
|
||||
|
||||
exports.verifyTransaction = function verifyTransaction(data, callback) {
|
||||
exports.verifyTx = function verifyTx(data, callback) {
|
||||
idVerifierPlugin.verifyTransaction(data, callback);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue