<div style="text-align: center">
<img src="https://hedgedoc.vergara.tech/uploads/c5321a48-ec18-451b-af45-ab812564e2b1.png" />
</div>
# Milestone 5 Report
## Executive Summary
On April 2023, [Taylor Hornby (Zcash Ecosystem Security Lead)](https://zecsec.com/) conducted a security audit of our code including the Angular User Interface, the Haskell API server and the WooCommerce plugin.
The findings were provided to us on early May and we have been hard at work to address the issues and recommendations provided.
We published [API version 1.5.0](https://git.vergara.tech/Vergara_Tech/zgo-backend/releases/tag/1.5.0) and [UI version 2.2.0](https://git.vergara.tech/Vergara_Tech/zgo/releases/tag/2.2.0) with remediation for the critical issues as soon as it was possible.
We have also published [API version 1.7.0](https://git.vergara.tech/Vergara_Tech/zgo-backend/releases/tag/1.7.0) and [UI version 2.3.1](https://git.vergara.tech/Vergara_Tech/zgo/releases/tag/2.3.1) containing the corrections to the rest of the findings from the security audit. These releases also include a redesign of how ZGo handles Sapling viewing keys leveraging our [Zcash-Haskell](https://git.vergara.tech/Vergara_Tech/zcash-haskell) library that reduces our dependency on `zcashd` and paves the way for our team to implement Unified Addresses and Unified Viewing Keys support independently from the `zcashd` roadmap.
This milestone also includes a re-design of the WooCommerce plugin to address changes in the WooCommerce platform released on their version 7.8.0.
## Progress Report
```mermaid
gantt
title ZGo Development 2022-2023
dateFormat YYYY-MM-DD
axisFormat %b-%y
todayMarker off
Payment Confirmation :done, a1, 2022-06-01, 60d
Milestone 1:milestone, done, 2022-07-31, 0d
Xero Integration :done, a4, after a1, 60d
Milestone 2:milestone, done, 2022-09-30, 0d
WooCommerce Integration:done, a4a, after a4, 100d
Data Export :done, a2, 2022-11-01, 30d
Milestone 3:milestone, done, 2023-01-10, 0d
Spanish Translation :done, a6, 2023-01-10, 60d
Portuguese Translation :done, a7, 2023-01-10, 60d
Xero Integration Enhancements :done, a8, 2023-01-10, 60d
Milestone 4:milestone, done, 2023-03-17, 0d
Security hardening :done, a9, 2023-05-04, 55d
Zcash-Haskell : active, 2023-03-18, 160d
Milestone 5:milestone, 2023-06-26, 0d
Unified Addresses : 2023-06-27, 60d
Tipping :a3, after a9, 30d
Tax Line :after a3, 25d
User Support :active, 2022-08-26, 360d
Milestone 6:milestone, 2023-08-26, 0d
```
### User Interface
#### Added
- Added the Xero invoice number in the memo for invoice payments.
- Service to request language tokens from server.
- New API calls for requesting language data for login page
#### Changed
- Modified order to handle new `token` field.
- Modified order service to query API using `token`.
- Modified receipt component to use the new `token`.
- Modified invoice component to use the new `token`.
- Modified payment service component to remove order-creation logic.
- Owner model modified to remove unnecessary fields
- Fullnode service uses `session` for API calls.
- User service uses `session` for API calls.
- Auth-guard service uses new `checkUser` function to confirm session exists and is validated.
#### Fixed
- Broken wallet link for invoices
- Owner model modified to remove unnecessary fields
- Fullnode service uses `session` for API calls.
- User service uses `session` for API calls.
- Auth-guard service uses new `checkUser` function to confirm session exists and is validated.
- Business sign-up stepper skipping is corrected
### API server
#### Added
- Parameter to config for number of confirmations for scan
- Endpoint for language for invoices
- New JSON serialization for WooTokens.
- New `/api/ownervk` endpoint to save viewing keys
- Use of `zcash-haskell` library to validate Sapling viewing keys
- `isUserValid` function
- New middleware to validated requests come from an existing user
- New endpoint for the language data of the login page
- New `OwnerData` to represent informational values
- New `OwnerSettings` to abstract configuration settings for owners
#### Changed
- Modified payment confirmation to use new WooCommerce plugin API endpoint.
- Consolidated the `invdata`, `orderid` and `orderx` endpoints
- The `xerotoken` endpoint uses `session` for authentication
- The order by ID/token endpoint includes shop name
- Modified the process of scanning for payments to only scan addresses that have an active ZGo session and have enabled payment confirmations
- Modified the process to mark paid orders to ensure only payments to the shop's wallet get marked as paid
- Modified the `items` endpoint to use the login session to identify records
- Modified API tests to use `session` parameter.
- Modified `api/owner` endpoint to use a specific data structure to create new owners
- Modified `api/owner` endpoint to use session as input
#### Fixed
- The viewing key obfuscation of blank viewing keys
### WooCommerce plugin
#### Changed
- Security hardening changes to plugin queries.
- Re-design of ZGo API callback to support WooCommerce 7.8.0
### Marketing
ZGo will be at [ZCon4](https://zfnd.org/zcon4/) this summer! We are looking forward to sharing the story of ZGo so far, to meeting the community members in person and continue the work of bringing adoption of ZEC for payments.
## Next Steps
:tada: Unified Addresses! :tada:
The work done in this milestone provides the building blocks needed to enhance ZGo to support Unified Addresses and, more importantly, Unified Viewing Keys. We are no longer dependent on this functionality being implemented in `zcashd` and we can implement it directly into our API server.
The implementation and development of `zcash-haskell` opens a new world of possibilities for ZGo and we will keep the community informed of our plans.