nimblehq/nimble-crypto-ios

[Integrate] As a user, I can see the coin’s current price on the Detail screen

Closed this issue · 0 comments

Why

  • The user should be able to see coin’s current price on the Detail screen.

Acceptance Criteria

  • On the Detail screen, the following section can be seen:

In light mode:

Detail Page

In dark mode:

Detail Page

  • The image will be based on the image.large.

  • The current price will be based on the current_price.usd and the fractional part will be rounded to 2 numbers.

  • The price change percentage will be based on the price_change_percentage_24h:

    • price_change_percentage_24h text is set to #F15950 with the down indicator and background is set to #F15950 with alpha 0.3 when it’s a negative number.

    • price_change_percentage_24h text is set to #10DC78 with the up indicator and background is set to #DBFBEC when it’s a positive number.

Screen Shot 2022-11-25 at 11 25 29

Screen Shot 2022-11-25 at 11 26 07

Note: The fractional part of price_change_percentage_24h rounded to 2 numbers: 6,2122 to 6,21.

  • The response will look as follows:

},
  "image": {
    "thumb": "https://assets.coingecko.com/coins/images/1/thumb/bitcoin.png?1547033579",
    "small": "https://assets.coingecko.com/coins/images/1/small/bitcoin.png?1547033579",
    "large": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png?1547033579"
  },
….
"market_data": {
    "current_price": {
      "usd": 16508.12,
    },
"price_change_percentage_24h": -1.53606
….

Design