Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

useCurrenciesByMarketcapWithStatus #1963

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

ThomasLaforge
Copy link

@ThomasLaforge ThomasLaforge commented May 16, 2022

Context (issues, jira)

Current hook to get data by marketcap was async and missing some info.
I created this new one to get loading status and errors to handle those informations on UI.
Here is the issue LIVE-1982.

Using this one I will be able to get an empty state until the loading or error state switch.

Description / Usage

const { loading, error, currencies } = useCurrenciesByMarketcapWithStatus(
    cryptoCurrencies,
);

Expectations

  • Test coverage: The changes of this PR are covered by test. Unit test were added with mocks when depending on a backend/device.
  • [*] No impact: The changes of this PR have ZERO impact on the userland. Meaning, we can use these changes without modifying LLD/LLM at all. It will be a "noop" and the maintainers will be able to bump it without changing anything.

@ThomasLaforge ThomasLaforge requested a review from a team as a code owner May 16, 2022 07:28
@vercel
Copy link

vercel bot commented May 16, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
ledger-live-common ✅ Ready (Inspect) Visit Preview May 16, 2022 at 7:51AM (UTC)

@codecov
Copy link

codecov bot commented May 16, 2022

Codecov Report

Merging #1963 (7108d9c) into develop (5b012ce) will increase coverage by 4.12%.
The diff coverage is 14.28%.

@@             Coverage Diff             @@
##           develop    #1963      +/-   ##
===========================================
+ Coverage    55.20%   59.33%   +4.12%     
===========================================
  Files          451      511      +60     
  Lines        20443    21029     +586     
  Branches      5255     5669     +414     
===========================================
+ Hits         11286    12477    +1191     
+ Misses        9128     8530     -598     
+ Partials        29       22       -7     
Impacted Files Coverage Δ
src/currencies/sortByMarketcap.ts 76.00% <7.69%> (+58.25%) ⬆️
src/currencies/index.ts 94.44% <100.00%> (+0.10%) ⬆️
src/families/crypto_org/api/sdk.ts 16.85% <0.00%> (-78.66%) ⬇️
src/families/celo/hw-app-celo.ts 3.38% <0.00%> (-77.97%) ⬇️
src/families/bitcoin/js-signOperation.ts 21.53% <0.00%> (-75.39%) ⬇️
src/families/bitcoin/networks.ts 5.88% <0.00%> (-74.51%) ⬇️
src/families/celo/js-getFeesForTransaction.ts 26.66% <0.00%> (-73.34%) ⬇️
src/hw/signTransaction/ripple.ts 27.27% <0.00%> (-72.73%) ⬇️
src/families/celo/js-buildTransaction.ts 27.27% <0.00%> (-72.73%) ⬇️
src/families/elrond/api/sdk.ts 22.64% <0.00%> (-71.70%) ⬇️
... and 358 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5b012ce...7108d9c. Read the comment docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants