Skip to content
This repository was archived by the owner on Aug 9, 2021. It is now read-only.

Testing

yaojie edited this page Dec 9, 2018 · 2 revisions

Steps to run an example flow

Step 0

Reset your Metamask account just in case you have already run some transactions on the testnet.

Step 1 - Account Creation

Create an account. The page will automatically refresh once your account is created.

Step 2 - Tickets

Upload some tickets. We have provided some handy ones in the project, in /tickets. You don't need to fill in Add Return Trip Ticket for Single Trips. AAAAA, AAAAG, AAAAI and AAAAK are valid single trip tickets. Refresh it with the sync button on the right to see the updated tickets in the blockchain. Purchase the insurance with the "Get Insured!" button.

Step 2.5 - Round Trip Tickets

To test round trip tickets, upload the second ticket with Add Return Trip Ticket. In /tickets, (AAAAH_1, AAAAH_2) and (AAAL_1, AAAAL_2) are valid round trip ticket pairs. Take note that the system does not discern between round and single trip tickets (if you only upload the first AAAAH ticket it will register it as a single trip for demonstration purposes)

Step 3 - Loyalty Points

Refresh the page to see the updated loyalty points once the insurance has been added to the blockchain.

Step 4 - Insurance Claiming

To claim payouts, click on claim payout button. Be sure to refresh at every step! Withdraw your payouts by clicking the big green button.

That's all!

Clone this wiki locally