-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create
ZQuery
package for managing data in Zustand (#1199)
* Create ZQuery lib * Remove unused code * Tweak syntax and fix performance * Refactor a little * Change slice name * Fix API to no longer use useStore * Simplify a bit * Make it possible to pass args to fetch() * Remove fetch args; go back to exposing hooks * Fix hooks * Use ZQuery for fetching unclaimed swaps * Coerce types for now * Rework a bit to simplify how the store is used * Remove unnecessary passing around of revalidate() function * Document the parameters * Add some spacing * Reorder destructuring * Add a ton more docs * Clarify docs a bit * Rename generic variable * Add more docs and accommodate more store typings * Take advantage of typings fixes * Move ZQuery to a package * fix type of use hook * Sort unclaimed swaps in fetcher; simplify component * Export the type * Install vitest * Write first tests * Significantly refactor ZQuery to handle streaming responses * Fix typing issues * Fix tests * Fix remaining type issues * Use updated ZQuery APi in UnclaimedSwaps and DutchAuction slices * Remove dupe code * Fix type * Clean up a bit; add explanatory comment * Remove duplicate type * Fix import * Support fetch args * Fix complaint about non-extensible data object * Use useAuctionInfos * Fix types again * Fix auction metadata * Fix QueryLatestStateButton * Remove unused DataTypeInState type * Require stream to be a function that returns the desired type * Fix type * Fix type * Handle errors in the stream * Fix circular reference issue * Convert status slice to use ZQuery * Simplify type * Fix import * Fix more type issues; support referencing counting * Rename var * Stop streaming results if aborted * Update docs * Add comment * Use correct source for latestKnownBlockHeight in TokenSwapInput * Remove unused abortController * Rename fetch types * Remove unneeded named types * Remove fetch options for now * Remove unnecessary optional checks * Update doc * Make exponents optional * Remove outdated comment * Add changeset
- Loading branch information
1 parent
adf3a28
commit 6b06e04
Showing
29 changed files
with
893 additions
and
326 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
'@penumbra-zone/zquery': major | ||
'@penumbra-zone/getters': minor | ||
'minifront': patch | ||
'@penumbra-zone/ui': patch | ||
--- | ||
|
||
Introduce ZQuery package and use throughout minifront |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
18 changes: 6 additions & 12 deletions
18
apps/minifront/src/components/header/sync-status-section.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/minifront/src/components/swap/auction-list/get-filtered-auction-infos.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
apps/minifront/src/components/swap/auction-list/get-filtered-auction-infos.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.