Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
f0f4110b
Unverified
Commit
f0f4110b
authored
Apr 06, 2021
by
Noah Zinsmeister
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update some multicall constants
parent
24521f0c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
10 deletions
+20
-10
useAllV3Ticks.ts
src/hooks/useAllV3Ticks.ts
+12
-9
hooks.ts
src/state/wallet/hooks.ts
+8
-1
No files found.
src/hooks/useAllV3Ticks.ts
View file @
f0f4110b
...
...
@@ -16,7 +16,7 @@ function bitmapIndex(tick: number, tickSpacing: number) {
return
compressed
>>
8
}
const
REFRESH_FREQUENCY
=
{
blocksPerFetch
:
10
}
const
REFRESH_FREQUENCY
=
{
blocksPerFetch
:
2
}
interface
TickData
{
tick
:
number
...
...
@@ -53,7 +53,7 @@ export function useAllV3Ticks(
'
getPopulatedTicksInWord
'
,
tickLensArgs
,
REFRESH_FREQUENCY
,
2
_0
00_000
1
_5
00_000
)
const
error
=
useMemo
(()
=>
callStates
.
some
(({
error
})
=>
error
),
[
callStates
])
...
...
@@ -81,11 +81,14 @@ export function useAllV3Ticks(
[
callStates
]
)
return
{
loading
,
syncing
,
error
,
valid
,
tickData
,
}
return
useMemo
(
()
=>
({
loading
,
syncing
,
error
,
valid
,
tickData
,
}),
[
loading
,
syncing
,
error
,
valid
,
tickData
]
)
}
src/state/wallet/hooks.ts
View file @
f0f4110b
...
...
@@ -62,7 +62,14 @@ export function useTokenBalancesWithLoadingIndicator(
const
validatedTokenAddresses
=
useMemo
(()
=>
validatedTokens
.
map
((
vt
)
=>
vt
.
address
),
[
validatedTokens
])
const
ERC20Interface
=
new
Interface
(
ERC20ABI
)
as
Erc20Interface
const
balances
=
useMultipleContractSingleData
(
validatedTokenAddresses
,
ERC20Interface
,
'
balanceOf
'
,
[
address
])
const
balances
=
useMultipleContractSingleData
(
validatedTokenAddresses
,
ERC20Interface
,
'
balanceOf
'
,
[
address
],
undefined
,
100
_000
)
const
anyLoading
:
boolean
=
useMemo
(()
=>
balances
.
some
((
callState
)
=>
callState
.
loading
),
[
balances
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment