Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linting issues #233

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Uniswap Info V3

An open sourced interface for Uniswap V3 analytics.
An open sourced interface for Uniswap V3 analytics.

Info URL: https://info.uniswap.org/#/

Expand Down
51 changes: 11 additions & 40 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -34748,18 +34748,14 @@
"name": "entity",
"description": null,
"isRepeatable": false,
"locations": [
"OBJECT"
],
"locations": ["OBJECT"],
"args": []
},
{
"name": "derivedFrom",
"description": null,
"isRepeatable": false,
"locations": [
"FIELD_DEFINITION"
],
"locations": ["FIELD_DEFINITION"],
"args": [
{
"name": "field",
Expand All @@ -34779,9 +34775,7 @@
"name": "subgraphId",
"description": null,
"isRepeatable": false,
"locations": [
"OBJECT"
],
"locations": ["OBJECT"],
"args": [
{
"name": "id",
Expand All @@ -34801,11 +34795,7 @@
"name": "include",
"description": "Directs the executor to include this field or fragment only when the `if` argument is true.",
"isRepeatable": false,
"locations": [
"FIELD",
"FRAGMENT_SPREAD",
"INLINE_FRAGMENT"
],
"locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"],
"args": [
{
"name": "if",
Expand All @@ -34829,11 +34819,7 @@
"name": "skip",
"description": "Directs the executor to skip this field or fragment when the `if` argument is true.",
"isRepeatable": false,
"locations": [
"FIELD",
"FRAGMENT_SPREAD",
"INLINE_FRAGMENT"
],
"locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"],
"args": [
{
"name": "if",
Expand All @@ -34857,12 +34843,7 @@
"name": "deprecated",
"description": "Marks an element of a GraphQL schema as no longer supported.",
"isRepeatable": false,
"locations": [
"FIELD_DEFINITION",
"ARGUMENT_DEFINITION",
"INPUT_FIELD_DEFINITION",
"ENUM_VALUE"
],
"locations": ["FIELD_DEFINITION", "ARGUMENT_DEFINITION", "INPUT_FIELD_DEFINITION", "ENUM_VALUE"],
"args": [
{
"name": "reason",
Expand All @@ -34882,9 +34863,7 @@
"name": "specifiedBy",
"description": "Exposes a URL that specifies the behaviour of this scalar.",
"isRepeatable": false,
"locations": [
"SCALAR"
],
"locations": ["SCALAR"],
"args": [
{
"name": "url",
Expand All @@ -34908,11 +34887,7 @@
"name": "client",
"description": "Direct the client to resolve this field locally, either from the cache or local resolvers.",
"isRepeatable": false,
"locations": [
"FIELD",
"FRAGMENT_DEFINITION",
"INLINE_FRAGMENT"
],
"locations": ["FIELD", "FRAGMENT_DEFINITION", "INLINE_FRAGMENT"],
"args": [
{
"name": "always",
Expand All @@ -34932,9 +34907,7 @@
"name": "export",
"description": "Export this locally resolved field as a variable to be used in the remainder of this query. See\nhttps://www.apollographql.com/docs/react/essentials/local-state/#using-client-fields-as-variables",
"isRepeatable": false,
"locations": [
"FIELD"
],
"locations": ["FIELD"],
"args": [
{
"name": "as",
Expand All @@ -34958,9 +34931,7 @@
"name": "connection",
"description": "Specify a custom store key for this result. See\nhttps://www.apollographql.com/docs/react/advanced/caching/#the-connection-directive",
"isRepeatable": false,
"locations": [
"FIELD"
],
"locations": ["FIELD"],
"args": [
{
"name": "key",
Expand Down Expand Up @@ -35002,4 +34973,4 @@
}
]
}
}
}
6 changes: 5 additions & 1 deletion src/components/Popups/ListUpdatePopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ export default function ListUpdatePopup({
removeThisPopup()
}, [auto, dispatch, listUrl, removeThisPopup])

const { added: tokensAdded, changed: tokensChanged, removed: tokensRemoved } = useMemo(() => {
const {
added: tokensAdded,
changed: tokensChanged,
removed: tokensRemoved,
} = useMemo(() => {
return diffTokenLists(oldList.tokens, newList.tokens)
}, [newList.tokens, oldList.tokens])
const numTokensChanged = useMemo(
Expand Down
31 changes: 16 additions & 15 deletions src/data/combined/pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ interface PoolDataResponse {
/**
* Fetch top addresses by volume
*/
export function usePoolDatas(
poolAddresses: string[]
): {
export function usePoolDatas(poolAddresses: string[]): {
loading: boolean
error: boolean
data:
Expand All @@ -111,18 +109,21 @@ export function usePoolDatas(
client: dataClient,
})

const { loading: loading24, error: error24, data: data24 } = useQuery<PoolDataResponse>(
POOLS_BULK(block24?.number, poolAddresses),
{ client: dataClient }
)
const { loading: loading48, error: error48, data: data48 } = useQuery<PoolDataResponse>(
POOLS_BULK(block48?.number, poolAddresses),
{ client: dataClient }
)
const { loading: loadingWeek, error: errorWeek, data: dataWeek } = useQuery<PoolDataResponse>(
POOLS_BULK(blockWeek?.number, poolAddresses),
{ client: dataClient }
)
const {
loading: loading24,
error: error24,
data: data24,
} = useQuery<PoolDataResponse>(POOLS_BULK(block24?.number, poolAddresses), { client: dataClient })
const {
loading: loading48,
error: error48,
data: data48,
} = useQuery<PoolDataResponse>(POOLS_BULK(block48?.number, poolAddresses), { client: dataClient })
const {
loading: loadingWeek,
error: errorWeek,
data: dataWeek,
} = useQuery<PoolDataResponse>(POOLS_BULK(blockWeek?.number, poolAddresses), { client: dataClient })

const anyError = Boolean(error || error24 || error48 || blockError || errorWeek)
const anyLoading = Boolean(loading || loading24 || loading48 || loadingWeek)
Expand Down
6 changes: 5 additions & 1 deletion src/data/pools/chartData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ export async function fetchPoolChartData(address: string, client: ApolloClient<N

try {
while (!allFound) {
const { data: chartResData, error, loading } = await client.query<ChartResults>({
const {
data: chartResData,
error,
loading,
} = await client.query<ChartResults>({
query: POOL_CHART,
variables: {
address: address,
Expand Down
31 changes: 16 additions & 15 deletions src/data/pools/poolData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ interface PoolDataResponse {
/**
* Fetch top addresses by volume
*/
export function usePoolDatas(
poolAddresses: string[]
): {
export function usePoolDatas(poolAddresses: string[]): {
loading: boolean
error: boolean
data:
Expand All @@ -111,18 +109,21 @@ export function usePoolDatas(
client: dataClient,
})

const { loading: loading24, error: error24, data: data24 } = useQuery<PoolDataResponse>(
POOLS_BULK(block24?.number, poolAddresses),
{ client: dataClient }
)
const { loading: loading48, error: error48, data: data48 } = useQuery<PoolDataResponse>(
POOLS_BULK(block48?.number, poolAddresses),
{ client: dataClient }
)
const { loading: loadingWeek, error: errorWeek, data: dataWeek } = useQuery<PoolDataResponse>(
POOLS_BULK(blockWeek?.number, poolAddresses),
{ client: dataClient }
)
const {
loading: loading24,
error: error24,
data: data24,
} = useQuery<PoolDataResponse>(POOLS_BULK(block24?.number, poolAddresses), { client: dataClient })
const {
loading: loading48,
error: error48,
data: data48,
} = useQuery<PoolDataResponse>(POOLS_BULK(block48?.number, poolAddresses), { client: dataClient })
const {
loading: loadingWeek,
error: errorWeek,
data: dataWeek,
} = useQuery<PoolDataResponse>(POOLS_BULK(blockWeek?.number, poolAddresses), { client: dataClient })

const anyError = Boolean(error || error24 || error48 || blockError || errorWeek)
const anyLoading = Boolean(loading || loading24 || loading48 || loadingWeek)
Expand Down
6 changes: 5 additions & 1 deletion src/data/pools/tickData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,11 @@ export const fetchTicksSurroundingPrice = async (
error?: boolean
data?: PoolTickData
}> => {
const { data: poolResult, error, loading } = await client.query<PoolResult>({
const {
data: poolResult,
error,
loading,
} = await client.query<PoolResult>({
query: poolQuery,
variables: {
poolAddress,
Expand Down
6 changes: 5 additions & 1 deletion src/data/protocol/chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ async function fetchChartData(client: ApolloClient<NormalizedCacheObject>) {

try {
while (!allFound) {
const { data: chartResData, error, loading } = await client.query<ChartResults>({
const {
data: chartResData,
error,
loading,
} = await client.query<ChartResults>({
query: GLOBAL_CHART,
variables: {
startTime: startTimestamp,
Expand Down
20 changes: 11 additions & 9 deletions src/data/protocol/overview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,17 @@ export function useFetchProtocolData(
// fetch all data
const { loading, error, data } = useQuery<GlobalResponse>(GLOBAL_DATA(), { client: activeDataClient })

const { loading: loading24, error: error24, data: data24 } = useQuery<GlobalResponse>(
GLOBAL_DATA(block24?.number ?? 0),
{ client: activeDataClient }
)

const { loading: loading48, error: error48, data: data48 } = useQuery<GlobalResponse>(
GLOBAL_DATA(block48?.number ?? 0),
{ client: activeDataClient }
)
const {
loading: loading24,
error: error24,
data: data24,
} = useQuery<GlobalResponse>(GLOBAL_DATA(block24?.number ?? 0), { client: activeDataClient })

const {
loading: loading48,
error: error48,
data: data48,
} = useQuery<GlobalResponse>(GLOBAL_DATA(block48?.number ?? 0), { client: activeDataClient })

const anyError = Boolean(error || error24 || error48 || blockError)
const anyLoading = Boolean(loading || loading24 || loading48)
Expand Down
4 changes: 1 addition & 3 deletions src/data/search/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,7 @@ interface PoolRes {
asAddress: PoolResFields[]
}

export function useFetchSearchResults(
value: string
): {
export function useFetchSearchResults(value: string): {
tokens: TokenData[]
pools: PoolData[]
loading: boolean
Expand Down
6 changes: 5 additions & 1 deletion src/data/tokens/chartData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ export async function fetchTokenChartData(address: string, client: ApolloClient<

try {
while (!allFound) {
const { data: chartResData, error, loading } = await client.query<ChartResults>({
const {
data: chartResData,
error,
loading,
} = await client.query<ChartResults>({
query: TOKEN_CHART,
variables: {
address: address,
Expand Down
6 changes: 5 additions & 1 deletion src/data/tokens/priceData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ export async function fetchTokenPriceData(
let skip = 0
let allFound = false
while (!allFound) {
const { data: priceData, errors, loading } = await dataClient.query<PriceResults>({
const {
data: priceData,
errors,
loading,
} = await dataClient.query<PriceResults>({
query: PRICE_CHART,
variables: {
address: address,
Expand Down
43 changes: 22 additions & 21 deletions src/data/tokens/tokenData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ interface TokenDataResponse {
/**
* Fetch top addresses by volume
*/
export function useFetchedTokenDatas(
tokenAddresses: string[]
): {
export function useFetchedTokenDatas(tokenAddresses: string[]): {
loading: boolean
error: boolean
data:
Expand All @@ -85,26 +83,29 @@ export function useFetchedTokenDatas(
client: dataClient,
})

const { loading: loading24, error: error24, data: data24 } = useQuery<TokenDataResponse>(
TOKENS_BULK(parseInt(block24?.number), tokenAddresses),
{
client: dataClient,
}
)
const {
loading: loading24,
error: error24,
data: data24,
} = useQuery<TokenDataResponse>(TOKENS_BULK(parseInt(block24?.number), tokenAddresses), {
client: dataClient,
})

const { loading: loading48, error: error48, data: data48 } = useQuery<TokenDataResponse>(
TOKENS_BULK(parseInt(block48?.number), tokenAddresses),
{
client: dataClient,
}
)
const {
loading: loading48,
error: error48,
data: data48,
} = useQuery<TokenDataResponse>(TOKENS_BULK(parseInt(block48?.number), tokenAddresses), {
client: dataClient,
})

const { loading: loadingWeek, error: errorWeek, data: dataWeek } = useQuery<TokenDataResponse>(
TOKENS_BULK(parseInt(blockWeek?.number), tokenAddresses),
{
client: dataClient,
}
)
const {
loading: loadingWeek,
error: errorWeek,
data: dataWeek,
} = useQuery<TokenDataResponse>(TOKENS_BULK(parseInt(blockWeek?.number), tokenAddresses), {
client: dataClient,
})

const anyError = Boolean(error || error24 || error48 || blockError || errorWeek)
const anyLoading = Boolean(loading || loading24 || loading48 || loadingWeek || !blocks)
Expand Down
Loading