From 6e6b5ee517cf7baae8914f62900a403018d2dda9 Mon Sep 17 00:00:00 2001 From: Simo Kinnunen Date: Wed, 26 Mar 2014 11:21:08 +0900 Subject: [PATCH] Use UUIDs for transaction IDs. Leave 'tx.' prefix for potentially easier debugging. --- res/app/components/stf/control/transaction-service.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/res/app/components/stf/control/transaction-service.js b/res/app/components/stf/control/transaction-service.js index 9e88ba61..0742675c 100644 --- a/res/app/components/stf/control/transaction-service.js +++ b/res/app/components/stf/control/transaction-service.js @@ -1,10 +1,11 @@ var Promise = require('bluebird') +var uuid = require('node-uuid') module.exports = function TransactionServiceFactory(socket) { var transactionService = {} function createChannel() { - return 'tx' + Date.now() // @todo UUID + return 'tx.' + uuid.v4() } function Transaction(devices) {