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

Commit

Permalink
fix-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
LFBarreto committed Feb 17, 2022
1 parent 1d1c24d commit 5901c29
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/market/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ async function setSupportedCoinsList(): Promise<SupportedCoins> {

const matchSearch =
(search: string) =>
(currency: MarketCoin): boolean => {
if (!search) return false;
const match = `${currency.symbol}|${currency.name}`;
return match.toLowerCase().includes(search.toLowerCase());
};
(currency: MarketCoin): boolean => {
if (!search) return false;
const match = `${currency.symbol}|${currency.name}`;
return match.toLowerCase().includes(search.toLowerCase());
};

function distributedCopy(items: number[], n: number): number[] {
const elements = [items[0]];
Expand Down Expand Up @@ -122,7 +122,8 @@ async function listPaginated({

const url =
`${ROOT_PATH}/coins/markets?vs_currency=${counterCurrency}&order=${orderBy}_${order}&per_page=${limit}` +
`&sparkline=${sparkline ? "true" : "false"
`&sparkline=${
sparkline ? "true" : "false"
}&price_change_percentage=${range}` +
`${ids.length > 0 ? `&page=1&&ids=${ids.toString()}` : `&page=${page}`}`;

Expand Down Expand Up @@ -180,8 +181,8 @@ async function listPaginated({
atlDate: currency.atl_date,
sparklineIn7d: currency?.sparkline_in_7d?.price
? sparklineAsSvgData(
distributedCopy(currency.sparkline_in_7d.price, 6 * 7)
) // keep 6 points per day
distributedCopy(currency.sparkline_in_7d.price, 6 * 7)
) // keep 6 points per day
: null,
chartData: [],
})
Expand Down

0 comments on commit 5901c29

Please sign in to comment.