Commit graph

9 commits

Author SHA1 Message Date
sapthasurendran
56a1bf3e19
* Made consistent lint command (#495)
* Removed global install of lint modules
* Fixed Lint Issues

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

added lint script forapplication javascript

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

updated lint command  for chaincode javascript

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

updated lint script

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

remove installing dependencies

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

added lint script to js projects

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

added more lint scripts

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

added more lint scripts

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

added missing npm lint command

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

added missing eslint npm module

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

Fix missing npm lint command

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

added missing eslint npm module to auction-simple javascctipt app

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

added eslint npm module

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

added eslint dependency

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

added eslint dependency

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

added eslint dependency

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

Single command for ts js lint

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

Fix or condition in lint.sh

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>
2021-10-06 13:33:29 +01:00
fraVlaca
53f0ef0d92
updated chaincodes for asset-transfer-basic in order to show good example on how achieving determinism over json (#486)
* updated chaincodes for asset-trnsfer-basic in order to show good example on how achieving determinism in json

Signed-off-by: fraVlaca <ocsenarf@outlook.com>

* final fixes for chaincode-java of asset-tranfer-basic

Signed-off-by: fraVlaca <ocsenarf@outlook.com>

* removed extra unused excheptions

Signed-off-by: fraVlaca <ocsenarf@outlook.com>

* corrected indentation of contract in the chancode-javasript of asset-trnsfer-basic

Signed-off-by: fraVlaca <ocsenarf@outlook.com>

* last fixes for chaincode-javascript of asset-transfer-basic

Signed-off-by: fraVlaca <ocsenarf@outlook.com>

* last last fixes for chaincode-javascript of asset-transfer-basic

Signed-off-by: fraVlaca <ocsenarf@outlook.com>
2021-09-06 13:47:25 +01:00
James Taylor
f84754ea3b
Update CreateAsset txn in basic js and ts sample (#460)
The Golang and Java sample chaincode returned an error when trying to create an asset which already exists

JavaScript and TypeScript samples should now do the same

Signed-off-by: James Taylor <jamest@uk.ibm.com>
2021-07-16 14:10:12 -04:00
Brett Logan
4c3fe17310 Refactor GetAllAssets
GetAllAssets uses getStateByRange which returns an iterator.
Refactored code to make use of the iterator as this code did
not function in its previous state

Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
2020-07-27 23:51:51 -04:00
Brett Logan
bd38f9220b Capitalize Function Names
Short of creating a second application that calls
the lowerCase version of functions, since Go requires
the functions be exported, capitalizing them in the
Node and Typescript chaincode seems the simplest solution

Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
2020-07-27 23:51:51 -04:00
Brett Logan
e31ecf3165 Decorate Typescript Chaincode
Add the contract-api specific annotations and
enable the experimental features.

Also properly format code according to the linter

Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
2020-07-27 23:51:51 -04:00
Arnaud J Le Hors
7771b4f216
Revert "Remove Typescript References (#258)" (#261)
This reverts commit 7a23d7872a.
2020-07-23 17:06:57 +02:00
Brett Logan
7a23d7872a
Remove Typescript References (#258)
As the Typescript examples are essentially just reiterations
of the same Javascript code, there is no benefit to having
providing examples in both languages. The functional code
was exactly the same in both languages. On the contrary it
meant we widened the surface of maitainence and thus we are
removing due to the limited benefit provided by the example
chaincode and applications.

Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
2020-07-22 21:57:54 +02:00
Chongxin Luo
a42bbba2c5 Adding chaincode-typescript to asset-transfer-basic sample.
Signed-off-by: Chongxin Luo <Chongxin.Luo@ibm.com>
2020-06-25 12:06:13 -04:00