diff --git a/chaincode/fabcar/typescript/src/car.ts b/chaincode/fabcar/typescript/src/car.ts index c886d654..ba101625 100644 --- a/chaincode/fabcar/typescript/src/car.ts +++ b/chaincode/fabcar/typescript/src/car.ts @@ -8,4 +8,4 @@ export class Car { public make: string; public model: string; public owner: string; -} \ No newline at end of file +} diff --git a/chaincode/fabcar/typescript/src/fabcar.ts b/chaincode/fabcar/typescript/src/fabcar.ts index 3423f24a..0db2a276 100644 --- a/chaincode/fabcar/typescript/src/fabcar.ts +++ b/chaincode/fabcar/typescript/src/fabcar.ts @@ -136,4 +136,4 @@ export class FabCar extends Contract { console.info('============= END : changeCarOwner ==========='); } -} \ No newline at end of file +} diff --git a/chaincode/fabcar/typescript/src/index.ts b/chaincode/fabcar/typescript/src/index.ts index ae4558aa..c0a2fcf6 100644 --- a/chaincode/fabcar/typescript/src/index.ts +++ b/chaincode/fabcar/typescript/src/index.ts @@ -5,4 +5,4 @@ import { FabCar } from './fabcar'; export { FabCar } from './fabcar'; -export const contracts: any[] = [ FabCar ]; \ No newline at end of file +export const contracts: any[] = [ FabCar ]; diff --git a/fabcar/javascript/query.js b/fabcar/javascript/query.js index 82f5367f..263b8186 100644 --- a/fabcar/javascript/query.js +++ b/fabcar/javascript/query.js @@ -48,7 +48,7 @@ async function main() { // Disconnect from the gateway. await gateway.disconnect(); - + } catch (error) { console.error(`Failed to evaluate transaction: ${error}`); process.exit(1); diff --git a/fabcar/typescript/src/enrollAdmin.ts b/fabcar/typescript/src/enrollAdmin.ts index e84139b8..632f53ee 100644 --- a/fabcar/typescript/src/enrollAdmin.ts +++ b/fabcar/typescript/src/enrollAdmin.ts @@ -10,7 +10,7 @@ import * as path from 'path'; async function main() { try { // load the network configuration - const ccpPath = path.resolve(__dirname, '..', '..', '..','test-network','organizations','peerOrganizations','org1.example.com', 'connection-org1.json'); + const ccpPath = path.resolve(__dirname, '..', '..', '..', 'test-network', 'organizations', 'peerOrganizations', 'org1.example.com', 'connection-org1.json'); const ccp = JSON.parse(fs.readFileSync(ccpPath, 'utf8')); // Create a new CA client for interacting with the CA. diff --git a/fabcar/typescript/src/invoke.ts b/fabcar/typescript/src/invoke.ts index 762263ed..12f84d2d 100644 --- a/fabcar/typescript/src/invoke.ts +++ b/fabcar/typescript/src/invoke.ts @@ -3,13 +3,13 @@ */ import { Gateway, Wallets } from 'fabric-network'; -import * as path from 'path'; import * as fs from 'fs'; +import * as path from 'path'; async function main() { try { // load the network configuration - const ccpPath = path.resolve(__dirname, '..', '..', '..','test-network','organizations','peerOrganizations','org1.example.com', 'connection-org1.json'); + const ccpPath = path.resolve(__dirname, '..', '..', '..', 'test-network', 'organizations', 'peerOrganizations', 'org1.example.com', 'connection-org1.json'); const ccp = JSON.parse(fs.readFileSync(ccpPath, 'utf8')); // Create a new file system based wallet for managing identities. diff --git a/fabcar/typescript/src/query.ts b/fabcar/typescript/src/query.ts index b86677ee..ccd0280b 100644 --- a/fabcar/typescript/src/query.ts +++ b/fabcar/typescript/src/query.ts @@ -3,14 +3,13 @@ */ import { Gateway, Wallets } from 'fabric-network'; -import * as path from 'path'; import * as fs from 'fs'; - +import * as path from 'path'; async function main() { try { // load the network configuration - const ccpPath = path.resolve(__dirname, '..', '..', '..','test-network','organizations','peerOrganizations','org1.example.com', 'connection-org1.json'); + const ccpPath = path.resolve(__dirname, '..', '..', '..', 'test-network', 'organizations', 'peerOrganizations', 'org1.example.com', 'connection-org1.json'); const ccp = JSON.parse(fs.readFileSync(ccpPath, 'utf8')); // Create a new file system based wallet for managing identities. diff --git a/fabcar/typescript/src/registerUser.ts b/fabcar/typescript/src/registerUser.ts index 45c07d3f..493982dc 100644 --- a/fabcar/typescript/src/registerUser.ts +++ b/fabcar/typescript/src/registerUser.ts @@ -2,16 +2,16 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { Wallets, X509Identity } from 'fabric-network'; import * as FabricCAServices from 'fabric-ca-client'; -import * as path from 'path'; +import { Wallets, X509Identity } from 'fabric-network'; import * as fs from 'fs'; +import * as path from 'path'; async function main() { try { // load the network configuration - const ccpPath = path.resolve(__dirname, '..', '..', '..','test-network','organizations','peerOrganizations','org1.example.com', 'connection-org1.json'); - let ccp = JSON.parse(fs.readFileSync(ccpPath, 'utf8')); + const ccpPath = path.resolve(__dirname, '..', '..', '..', 'test-network', 'organizations', 'peerOrganizations', 'org1.example.com', 'connection-org1.json'); + const ccp = JSON.parse(fs.readFileSync(ccpPath, 'utf8')); // Create a new CA client for interacting with the CA. const caURL = ccp.certificateAuthorities['ca.org1.example.com'].url; @@ -38,8 +38,8 @@ async function main() { } // build a user object for authenticating with the CA - const provider = wallet.getProviderRegistry().getProvider(adminIdentity.type); - const adminUser = await provider.getUserContext(adminIdentity, 'admin'); + const provider = wallet.getProviderRegistry().getProvider(adminIdentity.type); + const adminUser = await provider.getUserContext(adminIdentity, 'admin'); // Register the user, enroll the user, and import the new identity into the wallet. const secret = await ca.register({ affiliation: 'org1.department1', enrollmentID: 'appUser', role: 'client' }, adminUser);