JoyPass #OSTa3 Challenge — Week #3 Progress Update and Technical Spots

Daniel Pham
joypass
Published in
4 min readAug 1, 2018

It’s third week of #OSTa3 challenge. Today we would like to update our progress and share some technical talks about how we integrated Ledger & Balance api into JoyPass.

Recap

You may want to check out our previous articles regarding our progress and updates here

Our progress

Redeem Joy to Gift Card

The team is working very hard to speed up the project as well as dive deeper into the challenge, in last week, we have done some great stuffs regarding Redemption feature & improve UI. We’re working in a scrum team with 2-week duration for each sprint so we don’t have much thing to talk about what we have done because the sprint does not finish yet. Instead of that, we would like to share some technical ideas about how our team at JoyPass working with Balance & Ledger API.

How we integrated Ledger API into JoyPass

Bellow is sequence diagram of how we are working with Ledger API to retrieve transaction list and display on our application.

Sequence diagram of how we integrated Ledger API to JoyPass

There are 4 steps to archive the goal:

  1. Firstly, the mobile app will send a request to our REST API server
  2. REST API server will handle the request, get the wallet information (UID) and send a request to OST Platform to ask for the list of user’s transactions
  3. OST Platform then returns thelist of transactions of given wallet to our REST API Server
  4. Our REST API Server will retrieve additional data from our database and map to the list of transactions which we got from OST Platform (Such as action name, transaction memo,…) and return back to the user.

How We Implemented Real-time Converter from JOY to USD

If you already checked out our first update, you may see our awesome feature that allows user to quickly convert their balance to USD

The tech behind is very simple by using the combination of token-detail API and user’s balance API provided by OST API.

Below is the response from OST API when we send request to ask for token-detail

As describe in the documentation, we have current OST price is “0.050358” and conversion_factor is “1.96547”. To get thecurrent price of our BT, the formula will be

bt_price = ost_price / conversion_factor

So at the time we writing this article, the price of JOY is around “0.0256”. And here is what we have:

About JoyPass

Joy Pass aims to change the way people consume vouchers. Most of the vouchers we receive from restaurants and stores are just collecting dust in our drawers. Instead of receiving paper vouchers, customers can opt to receive JOY points insteads, which can be redeemed at participating stores, restaurants and communities.

About OST

OST is building the complete blockchain toolkit for business.
Our ambition is to be the blockchain technology partner of choice for businesses of all sizes and levels of technical sophistication, enabling any business to create, launch, and manage their own branded digital token economy powered by OpenST protocols and OST blockchain management software. The OpenST protocol enables companies to launch branded token economies on highly scalable, open, cryptographically auditable side blockchains. OST is actively investing in an ecosystem of developers and apps built on OST, to help drive requirements from actual use cases.

--

--