Closed nkrulikovsky closed 1 year ago
Merging #1305 (4e227e4) into master (3b2350d) will increase coverage by
0.00%
. The diff coverage is0.00%
.
@@ Coverage Diff @@
## master #1305 +/- ##
======================================
Coverage 9.40% 9.41%
======================================
Files 182 182
Lines 6730 6724 -6
Branches 2164 2165 +1
======================================
Hits 633 633
+ Misses 6097 6091 -6
Impacted Files | Coverage Δ | |
---|---|---|
src/components/PoolInfoCard.tsx | 0.00% <0.00%> (ø) |
|
src/hooks/usePoolData.ts | 0.00% <0.00%> (ø) |
|
src/hooks/useSwapStats.ts | 0.00% <0.00%> (ø) |
|
src/pages/App.tsx | 0.00% <ø> (ø) |
|
src/state/application.ts | 0.00% <ø> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
@hammeiam
I believe we are fetching swap state
on PoolInfoCard
, so when we open withdraw
or deposit
page, fetching will be occured.
@hammeiam I believe we are fetching
swap state
onPoolInfoCard
, so when we openwithdraw
ordeposit
page, fetching will be occurred.
swapStats
is used in PoolInfoCard
as well as in usePoolData
, where it is used for PoolOverview
to display APY and Volume. It would be good to remove swapStats
from usePoolData
eventually, but for now your new hook needs to make swapStats
available to usePoolData
as well to avoid regressions.
Describe
This PR replace fetch logic of swap state using
useQuery
.Right now, we get swap state when app load and store on redux. If user don't visit pool page, when we don't need to fetch swap state at first.
useQuery
stores data to cache, so we don't need to store this data on redux.