squeeth-monorepo
squeeth-monorepo copied to clipboard
Keeping ethPrice, dailyHistoricFunding and currentImpliedFunding in sync with network changes
Task:
Description
This is in continuation of the wrong data in wrong network issue fixes.
- Added networkId to ethPrice query key to ensure ethPrice is prefetched when there's a network change.
- Moves dailyHistoricFunding and currentImpliedFunding to fetch with react-query to ensure values are in sync with network changes.
- The other file changes were updates due to the changes in useDailyHistoricFunding and useCurrentImpliedFunding hooks.
- Update the onboard initialization
- added walletBalance atom.
Fixes # (issue) #479
Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Document update
How Has This Been Tested
Please describe how to test to verify the changes. Provide instructions so we can reproduce.
FE Checklist
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] My changes generate no new warnings
- [ ] Added video recordings if it is a UI change
User Facing Checklist
- [x] I fully understand the user problem this PR is solving
- [x] I know who the target user is for this PR and have a deep understanding of that user
- [x] I have tried this flow thinking from the pov of the target user for this PR
- [ ] I (or working w someone on team) have scheduled a user test for this PR (if it is a large change)
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
continuouscall | ✅ Ready (Inspect) | Visit Preview | Jun 21, 2022 at 8:03AM (UTC) |
Sometimes it show mainnet price for ropsten, if I press reload. Also funding takes lot of time to load
![]()
Funding takes longer to load on ropsten because everytime there is a refresh on ropsten, the funding requests initially fail with this error Returned values aren't valid, did it run Out of Gas?
so we have to refetch it after the error occurs and that takes some time. For mainnet it only happens when a user initially moves from ropsten to mainnet but it doesn't happen when you refresh on mainnet. @KMKoushik do you have any suggestions on avoiding this error?
@EstherSeyi I have only 1 issue now. If I reload with ropsten connected it always shows mainnet data