Hu-Fi / Mr.Market

Mr. Market is the exchange oracle of HuFi, and a CeFi crypto bot on Mixin Messenger
https://mr-market-one.vercel.app
GNU Affero General Public License v3.0
1 stars 6 forks source link

Add order detail page for spot on interface #75

Closed zed-wong closed 5 months ago

zed-wong commented 6 months ago

We need spot order details page at /spot/history/[order_uuid].

Under the bottom of this page are examples of ongoing orders. They only appears here when user have placed the limit order and the order is not filled.

The details page would be shown in 2 cases for now:

  1. when user have iuput the amount and confirmed an order. we should be checking the order status from our backend order api. Until we found the order, we redirect the user to /spot/history/[order_uuid]
  2. when user visit order history page and click on the order, we redirect the user to /spot/history/[order_uuid]

In this page, if the order is not filled, we should fetch backend order api (this api is not ready yet) periodically to update the order status.

Type of the order could be [limit_buy, limit_sell, market_buy, market_sell] and (swap_buy, swap_sell)

The states of the order could be found here. But not all these states needs to be shown in the user interface.

For example, for limit order, we can show state: created, partially filled, fully filled (releasing token), release token success(order success). for market order, states: created, releasing token, release success(order success)

We display the status based on the order type and the states.

zed-wong commented 6 months ago

Currently Gustavo is working on the design of this page, we can build this after Gustavo finish the design work