nimblehq / jetpack-compose-crypto

This is an sample Crypto market prices app built with Jetpack Compose
https://nimblehq.co/
MIT License
21 stars 5 forks source link

[#6] [Backend] As a user, I can see My Coins list on Home page #23

Closed hoangnguyen92dn closed 2 years ago

hoangnguyen92dn commented 2 years ago

https://github.com/nimblehq/jetpack-compose-crypto/issues/6

What happened 👀

When the user launches the app, it will show the "My Coins" section on the Home page.

Insight 📝

Proof Of Work 📹

image

2022-08-01 22:55:46.306 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: --> GET https://api.coingecko.com/api/v3/coins/markets?ids=bitcoin%2Cethereum%2Cbinancecoin%2Cripple%2Ccardano%2Csolana%2Cpolkadot%2Cnear%2Ctron%2Cdogecoin&vs_currency=usd&price_change_percentage=24h&order=market_cap_desc&per_page=10&page=1
2022-08-01 22:55:46.306 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: --> END GET

2022-08-01 22:55:46.837 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: <-- 200 https://api.coingecko.com/api/v3/coins/markets?ids=bitcoin%2Cethereum%2Cbinancecoin%2Cripple%2Ccardano%2Csolana%2Cpolkadot%2Cnear%2Ctron%2Cdogecoin&vs_currency=usd&price_change_percentage=24h&order=market_cap_desc&per_page=10&page=1 (530ms)
2022-08-01 22:55:46.837 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: date: Mon, 01 Aug 2022 15:55:46 GMT
2022-08-01 22:55:46.837 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: content-type: application/json; charset=utf-8
2022-08-01 22:55:46.837 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: x-frame-options: SAMEORIGIN
2022-08-01 22:55:46.837 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: x-xss-protection: 1; mode=block
2022-08-01 22:55:46.837 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: x-content-type-options: nosniff
2022-08-01 22:55:46.838 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: x-download-options: noopen
2022-08-01 22:55:46.838 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: x-permitted-cross-domain-policies: none
2022-08-01 22:55:46.838 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: referrer-policy: strict-origin-when-cross-origin
2022-08-01 22:55:46.838 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: cache-control: public, max-age=300
2022-08-01 22:55:46.838 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: access-control-allow-origin: *
2022-08-01 22:55:46.838 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: access-control-allow-methods: POST, PUT, DELETE, GET, OPTIONS
2022-08-01 22:55:46.838 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: access-control-request-method: *
2022-08-01 22:55:46.838 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, Authorization
2022-08-01 22:55:46.838 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: access-control-expose-headers: link, per-page, total
2022-08-01 22:55:46.838 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: vary: Accept-Encoding, Origin
2022-08-01 22:55:46.838 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: etag: W/"c462c239730634386105e1d02521aa32"
2022-08-01 22:55:46.838 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: x-request-id: 7ddea8d9-3e81-4b05-bf1b-bfe8a6315d94
2022-08-01 22:55:46.838 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: x-runtime: 0.055680
2022-08-01 22:55:46.838 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: alternate-protocol: 443:npn-spdy/2
2022-08-01 22:55:46.839 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: cf-cache-status: MISS
2022-08-01 22:55:46.839 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: expires: Mon, 01 Aug 2022 16:00:46 GMT
2022-08-01 22:55:46.839 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
2022-08-01 22:55:46.839 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: server: cloudflare
2022-08-01 22:55:46.839 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: cf-ray: 733fc28d7c6c3c8e-HKG
2022-08-01 22:55:46.842 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: [{"id":"bitcoin","symbol":"btc","name":"Bitcoin","image":"https://assets.coingecko.com/coins/images/1/large/bitcoin.png?1547033579","current_price":23324,"market_cap":445765606542,"market_cap_rank":1,"fully_diluted_valuation":489866259792,"total_volume":43663993494,"high_24h":24082,"low_24h":23010,"price_change_24h":-455.0910243202852,"price_change_percentage_24h":-1.91382,"market_cap_change_24h":-8438837902.136536,"market_cap_change_percentage_24h":-1.85794,"circulating_supply":19109456.0,"total_supply":21000000.0,"max_supply":21000000.0,"ath":69045,"ath_change_percentage":-66.19004,"ath_date":"2021-11-10T14:24:11.849Z","atl":67.81,"atl_change_percentage":34326.12063,"atl_date":"2013-07-06T00:00:00.000Z","roi":null,"last_updated":"2022-08-01T15:55:22.926Z","price_change_percentage_24h_in_currency":-1.913818952301725},{"id":"ethereum","symbol":"eth","name":"Ethereum","image":"https://assets.coingecko.com/coins/images/279/large/ethereum.png?1595348880","current_price":1675.09,"market_cap":200705502319,"market_cap_rank":2,"fully_diluted_valuation":null,"total_volume":15284263235,"high_24h":1743.65,"low_24h":1641.88,"price_change_24h":-37.26401767111429,"price_change_percentage_24h":-2.17618,"market_cap_change_24h":-4396262825.878845,"market_cap_change_percentage_24h":-2.14345,"circulating_supply":119917178.916828,"total_supply":119917178.916828,"max_supply":null,"ath":4878.26,"ath_change_percentage":-65.74665,"ath_date":"2021-11-10T14:24:19.604Z","atl":0.432979,"atl_change_percentage":385823.5743,"atl_date":"2015-10-20T00:00:00.000Z","roi":{"times":95.01256886210261,"currency":"btc","percentage":9501.256886210262},"last_updated":"2022-08-01T15:54:36.615Z","price_change_percentage_24h_in_currency":-2.1761835128081755},{"id":"binancecoin","symbol":"bnb","name":"BNB","image":"https://assets.coingecko.com/coins/images/825/large/bnb-icon2_2x.png?1644979850","current_price":286.37,"market_cap":46797099122,"market_cap_rank":5,"fully_diluted_valuation":47324403223,"total_volume":1375413211,"high_24h":295.81,"low_24h":282.45,"price_change_24h":-5.917863752090739,"price_change_percentage_24h":-2.02465,"market_cap_change_24h":-877977667.3385696,"market_cap_change_percentage_24h":-1.84159,"circulating_supply":163276974.63,"total_supply":163276974.63,"max_supply":165116760.0,"ath":686.31,"ath_change_percentage":-58.26627,"ath_date":"2021-05-10T07:24:17.097Z","atl":0.0398177,"atl_change_percentage":719231.69475,"atl_date":"2017-10-19T00:00:00.000Z","roi":null,"last_updated":"2022-08-01T15:55:34.384Z","price_change_percentage_24h_in_currency":-2.024651500703999},{"id":"ripple","symbol":"xrp","name":"XRP","image":"https://assets.coingecko.com/coins/images/44/large/xrp-symbol-white-128.png?1605778731","current_price":0.378658,"market_cap":18306318183,"market_cap_rank":6,"fully_diluted_valuation":37867488285,"total_volume":21172551077,"high_24h":0.398806,"low_24h":0.371184,"price_change_24h":-0.012258168422388305,"price_change_percentage_24h":-3.13575,"market_cap_change_24h":-551088789.0502892,"market_cap_change_percentage_24h":-2.9224,"circulating_supply":48343101197.0,"total_supply":99989535142.0,"max_supply":100000000000.0,"ath":3.4,"ath_change_percentage":-88.84868,"ath_date":"2018-01-07T00:00:00.000Z","atl":0.00268621,"atl_change_percentage":14008.0772,"atl_date":"2014-05-22T00:00:00.000Z","roi":null,"last_updated":"2022-08-01T15:55:45.293Z","price_change_percentage_24h_in_currency":-3.135751577016436},{"id":"cardano","symbol":"ada","name":"Cardano","image":"https://assets.coingecko.com/coins/images/975/large/cardano.png?1547034860","current_price":0.516782,"market_cap":17491816387,"market_cap_rank":8,"fully_diluted_valuation":23273968864,"total_volume":787050419,"high_24h":0.543787,"low_24h":0.506023,"price_change_24h":-0.01464601023945289,"price_change_percentage_24h":-2.75597,"market_cap_change_24h":-456094053.80150986,"market_cap_change_percentage_24h":-2.54121,"circulating_supply":33820262543.95,"total_supply":45000000000.0,"max_supply"
2022-08-01 22:55:46.842 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: :45000000000.0,"ath":3.09,"ath_change_percentage":-83.29688,"ath_date":"2021-09-02T06:00:10.474Z","atl":0.01925275,"atl_change_percentage":2578.11306,"atl_date":"2020-03-13T02:22:55.044Z","roi":null,"last_updated":"2022-08-01T15:55:27.756Z","price_change_percentage_24h_in_currency":-2.7559717367502157},{"id":"solana","symbol":"sol","name":"Solana","image":"https://assets.coingecko.com/coins/images/4128/large/solana.png?1640133422","current_price":42.54,"market_cap":14741164766,"market_cap_rank":9,"fully_diluted_valuation":null,"total_volume":1059408783,"high_24h":44.92,"low_24h":41.53,"price_change_24h":-1.5637325958027333,"price_change_percentage_24h":-3.54582,"market_cap_change_24h":-507837751.01003456,"market_cap_change_percentage_24h":-3.3303,"circulating_supply":346520683.347613,"total_supply":508180963.57,"max_supply":null,"ath":259.96,"ath_change_percentage":-83.68994,"ath_date":"2021-11-06T21:54:35.825Z","atl":0.500801,"atl_change_percentage":8366.33381,"atl_date":"2020-05-11T19:35:23.449Z","roi":null,"last_updated":"2022-08-01T15:55:12.300Z","price_change_percentage_24h_in_currency":-3.545823992810362},{"id":"polkadot","symbol":"dot","name":"Polkadot","image":"https://assets.coingecko.com/coins/images/12171/large/polkadot.png?1639712644","current_price":8.49,"market_cap":9641932000,"market_cap_rank":10,"fully_diluted_valuation":null,"total_volume":873065806,"high_24h":9.18,"low_24h":8.33,"price_change_24h":0.121427,"price_change_percentage_24h":1.45129,"market_cap_change_24h":147641075,"market_cap_change_percentage_24h":1.55505,"circulating_supply":1136844220.09768,"total_supply":1217784390.68523,"max_supply":null,"ath":54.98,"ath_change_percentage":-84.58985,"ath_date":"2021-11-04T14:10:09.301Z","atl":2.7,"atl_change_percentage":214.09751,"atl_date":"2020-08-20T05:48:11.359Z","roi":null,"last_updated":"2022-08-01T15:55:38.729Z","price_change_percentage_24h_in_currency":1.4512936257818976},{"id":"dogecoin","symbol":"doge","name":"Dogecoin","image":"https://assets.coingecko.com/coins/images/5/large/dogecoin.png?1547792256","current_price":0.069192,"market_cap":9160718323,"market_cap_rank":11,"fully_diluted_valuation":null,"total_volume":474048441,"high_24h":0.071834,"low_24h":0.067921,"price_change_24h":-0.001596085417428367,"price_change_percentage_24h":-2.25475,"market_cap_change_24h":-199889108.05298996,"market_cap_change_percentage_24h":-2.13543,"circulating_supply":132670764299.894,"total_supply":null,"max_supply":null,"ath":0.731578,"ath_change_percentage":-90.57952,"ath_date":"2021-05-08T05:08:23.458Z","atl":8.69e-05,"atl_change_percentage":79204.00099,"atl_date":"2015-05-06T00:00:00.000Z","roi":null,"last_updated":"2022-08-01T15:55:21.594Z","price_change_percentage_24h_in_currency":-2.2547520439085287},{"id":"tron","symbol":"trx","name":"TRON","image":"https://assets.coingecko.com/coins/images/1094/large/tron-logo.png?1547035066","current_price":0.069245,"market_cap":6401711199,"market_cap_rank":17,"fully_diluted_valuation":null,"total_volume":438655696,"high_24h":0.070927,"low_24h":0.068471,"price_change_24h":-0.001341143854281302,"price_change_percentage_24h":-1.90001,"market_cap_change_24h":-115777415.18669605,"market_cap_change_percentage_24h":-1.77641,"circulating_supply":92423694513.4047,"total_supply":101900409184.273,"max_supply":null,"ath":0.231673,"ath_change_percentage":-70.09542,"ath_date":"2018-01-05T00:00:00.000Z","atl":0.00180434,"atl_change_percentage":3739.67041,"atl_date":"2017-11-12T00:00:00.000Z","roi":{"times":35.44465604626987,"currency":"usd","percentage":3544.465604626987},"last_updated":"2022-08-01T15:55:34.522Z","price_change_percentage_24h_in_currency":-1.900014220640053},{"id":"near","symbol":"near","name":"NEAR Protocol","image":"https://assets.coingecko.com/coins/images/10365/large/near_icon.png?1601359077","current_price":4.29,"market_cap":3219986182,"market_cap_rank":27,"fully_diluted_valuation":4294747938,"total_volume":240882741,"high_24h":4.58,"low_24h":4.17,"price_change_24h"
2022-08-01 22:55:46.842 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: :-0.16061636363616483,"price_change_percentage_24h":-3.61151,"market_cap_change_24h":-108066166.40251398,"market_cap_change_percentage_24h":-3.24713,"circulating_supply":749749747.505209,"total_supply":1000000000.0,"max_supply":1000000000.0,"ath":20.44,"ath_change_percentage":-79.02892,"ath_date":"2022-01-16T22:09:45.873Z","atl":0.526762,"atl_change_percentage":713.66755,"atl_date":"2020-11-04T16:09:15.137Z","roi":null,"last_updated":"2022-08-01T15:55:03.280Z","price_change_percentage_24h_in_currency":-3.611508810384871}]
2022-08-01 22:55:46.842 19051-19205/co.nimblehq.compose.crypto.staging I/okhttp.OkHttpClient: <-- END HTTP (8527-byte body)
Wadeewee commented 2 years ago

@hoangnguyen92dn Could you please rebase this branch feature/5-implement-ui-my-coins-list-on-home-screen, Also fix the EOF 🙏

luongvo commented 2 years ago

Oops, Detekt is failed @hoangnguyen92dn

hoangnguyen92dn commented 2 years ago

@luongvo @Wadeewee Updated 🚀

github-actions[bot] commented 2 years ago
8 Warnings
:warning: /home/runner/.gradle/caches/transforms-2/files-2.1/4f51a96613303924c40cd417b6993d48/jetified-timber-4.7.1/jars/lint.jar#L0 - Lint found an issue registry (timber.lint.TimberIssueRegistry) which is older than the current API level; these checks may not work correctly.

Recompile the checks against the latest version. Custom check API version is 1 (3.1), current lint API level is 8 (4.1)

:warning: /home/runner/.gradle/caches/transforms-2/files-2.1/f7ef8adf73d1f4d85ea6c92e60c71486/jetified-annotation-experimental-1.0.0/jars/lint.jar#L0 - Lint found an issue registry (androidx.annotation.experimental.lint.ExperimentalIssueRegistry) which did not specify the Lint API version it was compiled with.

This means that the lint checks are likely not compatible.

If you are the author of this lint check, make your lint IssueRegistry class contain
  override val api: Int = com.android.tools.lint.detector.api.CURRENT_API
or from Java,
  @Override public int getApi() { return com.android.tools.lint.detector.api.ApiKt.CURRENT_API; }

If you are just using lint checks from a third party library you have no control over, you can disable these lint checks (if they misbehave) like this:

    android {
        lintOptions {
            disable "UnsafeExperimentalUsageError",
                    "UnsafeExperimentalUsageWarning"
        }
    }

:warning: app/src/debug/AndroidManifest.xml#L5 - On SDK version 23 and up, your app data will be automatically backed up and restored on app install. Consider adding the attribute android:fullBackupContent to specify an @xml resource which configures which files to backup. More info: https://developer.android.com/training/backup/autosyncapi.html
:warning: app/src/main/AndroidManifest.xml#L7 - On SDK version 23 and up, your app data will be automatically backed up and restored on app install. Consider adding the attribute android:fullBackupContent to specify an @xml resource which configures which files to backup. More info: https://developer.android.com/training/backup/autosyncapi.html
:warning: app/src/main/AndroidManifest.xml#L12 - Attribute networkSecurityConfig is only used in API level 24 and higher (current min is 23)
:warning: app/src/main/res/drawable/ic_btc_bitcoin.png#L0 - Found bitmap drawable res/drawable/ic_btc_bitcoin.png in densityless folder
:warning: app/src/main/res/layout/activity_main.xml#L2 - The resource R.layout.activity_main appears to be unused
:warning: app/src/main/res/navigation/nav_graph_main.xml#L2 - The resource R.navigation.nav_graph_main appears to be unused

CoroutineTemplate Jacoco report:

Generated by :no_entry_sign: Danger

hoangnguyen92dn commented 2 years ago

@luongvo Nice. Detekt unblocked 🚀