FAB-11518

Fixed typo in instatiate-chaincode.js and removed unused imports from other JavaScript files in balance-transfer/app

Change-Id: If9695c4f51e9c0835230b2c7f969cbf4aa132675
Signed-off-by: Clyde DCruz <clydecroix@gmail.com>
This commit is contained in:
clydedacruz 2018-08-08 23:32:53 +05:30
parent 5930dfc06a
commit bfdc0b6e7a
7 changed files with 4 additions and 30 deletions

View file

@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var util = require('util');
var fs = require('fs');
var path = require('path');

View file

@ -20,19 +20,9 @@ logger.setLevel('DEBUG');
var path = require('path');
var util = require('util');
var copService = require('fabric-ca-client');
var hfc = require('fabric-client');
hfc.setLogger(logger);
var ORGS = hfc.getConfigSetting('network-config');
var clients = {};
var channels = {};
var caClients = {};
var sleep = async function (sleep_time_ms) {
return new Promise(resolve => setTimeout(resolve, sleep_time_ms));
}
async function getClientForOrg (userorg, username) {
logger.debug('getClientForOrg - ****** START %s %s', userorg, username)

View file

@ -14,13 +14,9 @@
* limitations under the License.
*/
'use strict';
var path = require('path');
var fs = require('fs');
var util = require('util');
var config = require('../config.json');
var helper = require('./helper.js');
var logger = helper.getLogger('install-chaincode');
var tx_id = null;
var installChaincode = async function(peers, chaincodeName, chaincodePath,
chaincodeVersion, chaincodeType, username, org_name) {
@ -76,7 +72,7 @@ var installChaincode = async function(peers, chaincodeName, chaincodePath,
}
if (!error_message) {
let message = util.format('Successfully install chaincode');
let message = util.format('Successfully installed chaincode');
logger.info(message);
// build a response to send back to the REST caller
let response = {

View file

@ -14,10 +14,7 @@
* limitations under the License.
*/
'use strict';
var path = require('path');
var fs = require('fs');
var util = require('util');
var hfc = require('fabric-client');
var helper = require('./helper.js');
var logger = helper.getLogger('instantiate-chaincode');
@ -117,7 +114,7 @@ var instantiateChaincode = async function(peers, channelName, chaincodeName, cha
clearTimeout(event_timeout);
if (code !== 'VALID') {
let message = until.format('The chaincode instantiate transaction was invalid, code:%s',code);
let message = util.format('The chaincode instantiate transaction was invalid, code:%s',code);
logger.error(message);
reject(new Error(message));
} else {
@ -187,7 +184,7 @@ var instantiateChaincode = async function(peers, channelName, chaincodeName, cha
if (!error_message) {
let message = util.format(
'Successfully instantiate chaingcode in organization %s to the channel \'%s\'',
'Successfully instantiate chaincode in organization %s to the channel \'%s\'',
org_name, channelName);
logger.info(message);
// build a response to send back to the REST caller

View file

@ -14,10 +14,7 @@
* limitations under the License.
*/
'use strict';
var path = require('path');
var fs = require('fs');
var util = require('util');
var hfc = require('fabric-client');
var helper = require('./helper.js');
var logger = helper.getLogger('invoke-chaincode');

View file

@ -14,8 +14,6 @@
* limitations under the License.
*/
var util = require('util');
var path = require('path');
var fs = require('fs');
var helper = require('./helper.js');
var logger = helper.getLogger('Join-Channel');
@ -71,7 +69,7 @@ var joinChannel = async function(channel_name, peers, username, org_name) {
if(peer_result.response && peer_result.response.status == 200) {
logger.info('Successfully joined peer to the channel %s',channel_name);
} else {
let message = util.format('Failed to joined peer to the channel %s',channel_name);
let message = util.format('Failed to join peer to the channel %s',channel_name);
error_message = message;
logger.error(message);
}

View file

@ -13,10 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var path = require('path');
var fs = require('fs');
var util = require('util');
var hfc = require('fabric-client');
var helper = require('./helper.js');
var logger = helper.getLogger('Query');