ibm-blockchain-js
Advanced tools
Comparing version 1.2.3 to 1.2.4
23
index.js
@@ -545,3 +545,3 @@ 'use strict'; | ||
if(e != null){ | ||
logger.error('[ibc-js] ibc.save() error', e); | ||
logger.warn('[ibc-js] ibc.save() warning', e); | ||
if(cb) cb(helper.eFmt('save() fs write error', 500, e), null); | ||
@@ -587,7 +587,7 @@ } | ||
options.success = function(statusCode, data){ | ||
logger.log('[ibc-js] Block Stats - success'); | ||
logger.log('[ibc-js] Block Stats ', id , '- success'); | ||
if(cb) cb(null, data); | ||
}; | ||
options.failure = function(statusCode, e){ | ||
logger.error('[ibc-js] Block Stats - failure:', statusCode); | ||
logger.error('[ibc-js] Block Stats ', id , '- failure:', statusCode); | ||
if(cb) cb(helper.eFmt('block_stats() error', statusCode, e), null); | ||
@@ -628,7 +628,11 @@ }; | ||
options.success = function(statusCode, data){ | ||
logger.log('[ibc-js] Read - success:', data); | ||
if(cb) cb(null, data.OK); | ||
logger.log('[ibc-js] (Read) - success:', data); | ||
if(cb){ | ||
if(data.error) cb(helper.eFmt('query() resp error', 400, data.error), null); | ||
else if(data.result) cb(null, data.result.message); | ||
else cb(null, data.OK); | ||
} | ||
}; | ||
options.failure = function(statusCode, e){ | ||
logger.error('[ibc-js] Read - failure:', statusCode); | ||
logger.error('[ibc-js] (Read) - failure:', statusCode); | ||
if(cb) cb(helper.eFmt('read() error', statusCode, e), null); | ||
@@ -783,3 +787,5 @@ }; | ||
if(ibc.chaincode.details.deployed_name.length < 32) ibc.chaincode.details.deployed_name = ''; //doesnt look right, let code below catch error | ||
if(!ibc.chaincode.details.deployed_name || ibc.chaincode.details.deployed_name.length < 32){ | ||
ibc.chaincode.details.deployed_name = ''; //doesnt look right, let code below catch error | ||
} | ||
@@ -1018,3 +1024,4 @@ if(ibc.chaincode.details.deployed_name === ''){ | ||
if(data){ | ||
if(data.result) cb(null, data.result.message); | ||
if(data.error) cb(helper.eFmt('query() resp error', 400, data.error), null); | ||
else if(data.result) cb(null, data.result.message); | ||
else cb(null, data.OK); | ||
@@ -1021,0 +1028,0 @@ } |
{ | ||
"name": "ibm-blockchain-js", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "A library for easily interacting with IBM Blockchain.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
91124
1422