diff --git a/README.md b/README.md index a64ac7f3..e7486b10 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ -# AWS Managed Blockchain Workshop +# Amazon Managed Blockchain Workshop + +![Amazon Managed Blockchain](images/AmazonManagedBlockchain.png "Amazon Managed Blockchain") ## Building a network to track spending by non-profit organizations -This workshop builds an AWS Managed Blockchain Hyperledger Fabric network, a RESTful API and a +This workshop builds an Amazon Managed Blockchain Hyperledger Fabric network, a RESTful API and a User Interface application that tracks donations and spend for non-profit organizations. Donors are able to track the donations they make and how how their donations are being spent. Donations and spending are tracked on a Hyperledger Fabric blockchain network with both donors and non-profits @@ -13,11 +15,11 @@ and spending are tracked on a Hyperledger Fabric blockchain network with both do and invoke chaincode * Fabric Chaincode, written in Node.js, deployed to a Hyperledger Fabric network -This workshop will build an AWS Managed Blockchain Hyperledger Fabric network, deploy the chaincode, +This workshop will build an Amazon Managed Blockchain Hyperledger Fabric network, deploy the chaincode, start the REST API server and finally run a UI application that uses the REST API to interact with the Fabric network. The workshop is divided into four parts: -1. Building an AWS Managed Blockchain Hyperledger Fabric network. Instructions can be found in the folder: [ngo-fabric](ngo-fabric) +1. Building an Amazon Managed Blockchain Hyperledger Fabric network. Instructions can be found in the folder: [ngo-fabric](ngo-fabric) 2. Deploying the chaincode, or smart contract, that provides the donation and spend tracking functionality. Instructions can be found in the folder: [ngo-chaincode](ngo-chaincode) 3. Starting the RESTful API server that exposes the chaincode functions to client applications. Instructions can be found in the folder: [ngo-rest-api](ngo-rest-api) 4. Running the User Interface application. Instructions can be found in the folder: [ngo-ui](ngo-ui) @@ -26,7 +28,7 @@ network. The workshop is divided into four parts: To build the network, deploy the chaincode, start the RESTful API server and run the application, follow the README instructions in parts 1-4, in this order: -* [Part 1:](ngo-fabric/README.md) Start the workshop by building the AWS Managed Blockchain Hyperledger Fabric network. +* [Part 1:](ngo-fabric/README.md) Start the workshop by building the Amazon Managed Blockchain Hyperledger Fabric network. * [Part 2:](ngo-chaincode/README.md) Deploy the NGO chaincode. * [Part 3:](ngo-rest-api/README.md) Run the REST API. * [Part 4:](ngo-ui/README.md) Run the Application. diff --git a/images/AmazonManagedBlockchain.png b/images/AmazonManagedBlockchain.png new file mode 100644 index 00000000..3dbd4227 Binary files /dev/null and b/images/AmazonManagedBlockchain.png differ diff --git a/ngo-ui/README.md b/ngo-ui/README.md index 75d86c85..1a98e750 100644 --- a/ngo-ui/README.md +++ b/ngo-ui/README.md @@ -104,7 +104,7 @@ will call the Fabric CA and enroll a new user. This user will then be used to in execute queries against the Fabric network. You can register a new user in the UI application. The link is on the login page. You can then login as that user and explore the application. -All of the information you see in the application is stored in the AWS Managed Blockchain Fabric network. +All of the information you see in the application is stored in the Amazon Managed Blockchain Fabric network. You can check this by querying the REST API directly. You can cURL the REST API from the Fabric client node. Examples of the cURL commands used with the REST API can be found in the files that load test data into the network, such as [this one](../ngo-rest-api/ngo-load-workshop.sh) @@ -113,13 +113,13 @@ You could also query the chaincode directly and see the same information. You qu the Fabric client node. An example of how to query the chaincode can be found in [this script](../ngo-chaincode/test-chaincode-aws.sh) ## Step 6 - Pat yourself on the back, you've completed the workshop -You have successfully built a Hyperledger Fabric network using the AWS Managed Blockchain service, deployed +You have successfully built a Hyperledger Fabric network using the Amazon Managed Blockchain service, deployed chaincode to the service, connected a RESTful API to the service and deployed an Angular application that communicates with the RESTful API. The workshop instructions can be found in the README files in parts 1-4: -* [Part 1:](../ngo-fabric/README.md) Start the workshop by building the AWS Managed Blockchain Hyperledger Fabric network. +* [Part 1:](../ngo-fabric/README.md) Start the workshop by building the Amazon Managed Blockchain Hyperledger Fabric network. * [Part 2:](../ngo-chaincode/README.md) Deploy the NGO chaincode. * [Part 3:](../ngo-rest-api/README.md) Run the REST API. * [Part 4:](../ngo-ui/README.md) Run the Application. diff --git a/ngo-ui/src/app/services/shared/utils.service.ts b/ngo-ui/src/app/services/shared/utils.service.ts index 3b7c21c8..cfdffa72 100644 --- a/ngo-ui/src/app/services/shared/utils.service.ts +++ b/ngo-ui/src/app/services/shared/utils.service.ts @@ -50,7 +50,7 @@ export class UtilsService { try { const decimalIndex = floatStr.indexOf('.'); if (decimalIndex > 0 && floatStr.length > decimalIndex + offset) { - return parseFloat(floatStr.substring(floatStr.indexOf('.'), floatStr.indexOf('.') + offset)); + return parseFloat(floatStr.substring(0, decimalIndex + offset)); } return parseFloat(floatStr); } catch (e) {