Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (fcn === 'SuccessShim') {
return Shim.success();
}
await this.testAll(stub);
if (fcn === 'nopayload') {
return shim.success();
}
if (fcn === 'myReturnCode') {
let rc: number;
rc = ChaincodeStub.RESPONSE_CODE.OK;
rc = shim.RESPONSE_CODE.OK;
rc = ChaincodeStub.RESPONSE_CODE.ERRORTHRESHOLD;
rc = shim.RESPONSE_CODE.ERRORTHRESHOLD;
rc = ChaincodeStub.RESPONSE_CODE.ERROR;
rc = shim.RESPONSE_CODE.ERROR;
rc++;
}
return shim.success(Buffer.from('all good'));
}
}
if (fcn === 'SuccessShim') {
return Shim.success();
}
await this.testAll(stub);
if (fcn === 'nopayload') {
return shim.success();
}
if (fcn === 'myReturnCode') {
let rc: number;
rc = ChaincodeStub.RESPONSE_CODE.OK;
rc = shim.RESPONSE_CODE.OK;
rc = ChaincodeStub.RESPONSE_CODE.ERRORTHRESHOLD;
rc = shim.RESPONSE_CODE.ERRORTHRESHOLD;
rc = ChaincodeStub.RESPONSE_CODE.ERROR;
rc = shim.RESPONSE_CODE.ERROR;
rc++;
}
return shim.success(Buffer.from('all good'));
}