feat: add interface for settle the next noun#1048
feat: add interface for settle the next noun#1048nekofar wants to merge 25 commits intonounsDAO:masterfrom
Conversation
|
will most likely close #998 |
7396691 to
0d8dba1
Compare
|
@volkyeth Fixed a few minor things; page still looks kinda empty though. Any ideas? |
|
@nekofar it loads for a while, then it's blank for me |
❌ Deploy Preview for nouns-home failed.
|
|
same problem on the deployment above |
I think WebSocket URL is not configured properly on deployment. There are forbidden errors on WS endpoint on deployment. |
|
npmjs registry down 😮...what a day |
616f8f4 to
02dc4b2
Compare
|
do you mind if I try my hand at adding some flair to it? |
| <Button className={classes.bidBtnAuctionEnded} onClick={fomoNounsBtnOnClickHandler}> | ||
| <Trans>Vote for the next Noun</Trans> ⌐◧-◧ | ||
| <Button className={classes.bidBtnAuctionEnded} onClick={() => navigate('/oracle')}> | ||
| <Trans>Settle the next Noun</Trans> ⌐◧-◧ |
There was a problem hiding this comment.
| <Trans>Settle the next Noun</Trans> ⌐◧-◧ | |
| <Trans>Pick the next Noun</Trans> ⌐◧-◧ |
| } = useWriteNounsAuctionHouseSettleCurrentAndCreateNewAuction(); | ||
|
|
||
| useWatchBlocks({ | ||
| syncConnectedChain: false, |
There was a problem hiding this comment.
should probably set this up globally on wagmi.ts
(I thought it was already 🤔 )
| import { formatEther } from 'viem'; | ||
| import { useWatchBlocks } from 'wagmi'; | ||
|
|
||
| import Noun, { LoadingNoun } from '@/components/LegacyNoun'; |
There was a problem hiding this comment.
Can you use the newer "@/components/Noun.tsx"
We should probably deprecate LegacyNoun in favor of it
| }; | ||
|
|
||
| const processNounData = (nounId: number, blockHash: string) => { | ||
| const nounSeed = getNounSeedFromBlockHash(nounId, blockHash); |
There was a problem hiding this comment.
if you use the newer @/components/Noun.tsx you can just provide it the seed and get rid of the logic below
| try { | ||
| setCurrentBlockTimestamp(Number(block.timestamp)); | ||
|
|
||
| const auctionData = await readNounsAuctionHouseAuction(config, {}); |
There was a problem hiding this comment.
could update the auction separately, since this fetch seems to add ~1 second of delay when rendering the next Noun, and since settling is very time-sensitive
| }, [didSettleFail, settleAuctionError?.message]); | ||
|
|
||
| const handleSettleAuction = useCallback(() => { | ||
| settleAuction({}); |
There was a problem hiding this comment.
wondering if we should provide maxFeePerGas and maxPriorityFeePerGas to ensure it settles in the very next block instead of relying on the wallet for gas params, lest folks fumble it
|
I'll look into this on weekend. 👍 |
introduce `OraclePage` and register it under the "/oracle" route. This provides a framework for implementing the Oracle feature.
replace external link with navigation to `/oracle` route. This aligns the flow with the new Oracle feature and improves user experience.
enhance navbar button state by including `/oracle` in `useStateBg`. This ensures consistent styles for the newly added Oracle route.
add auction state handling and display next noun preview for `/oracle`. This improves user experience by providing real-time auction updates and visual representation of the next noun.
separate auction state determination and next noun processing into reusable functions. This improves code readability, reduces duplication, and ensures better maintainability.
introduce auction settlement with an alert modal for failures. This improves usability by allowing users to settle auctions directly and see error notifications.
streamline conditional rendering for loading and auction states. This improves code readability and reduces unnecessary nesting.
introduce a ref to track the previous noun ID and optimize loading. This ensures updates only occur on noun ID changes, improving efficiency and clarity.
introduce block countdown feature with `BlockTimeCountdown` component and update noun ID increment logic. This enhances user experience by providing real-time block updates and ensuring accurate noun ID progression.
extract and simplify auction and noun processing logic into reusable functions and dedicated components. This improves readability, reduces redundancy, and enhances maintainability.
simplify error handling by replacing `AlertModal` with `toast.error`. This improves user experience with consistent and less intrusive notifications.
align with updated component structure by importing from `LegacyNoun`. This improves maintainability and reflects recent component changes.
simplify auction handling by removing manual settlement button. This reduces redundancy and aligns with the streamlined auction process.
simplify structure by relocating `Oracle` page. This improves organization and aligns with directory conventions.
simplify styling by switching to `className` syntax for consistency. This improves readability and aligns with modern React best practices.
switch to `container-xl` and `lg:flex-row` for improved alignment with modern screen sizes and design standards.
streamline auction state checks and conditional rendering logic. This improves code readability and ensures clearer auction status display.
replace conditional rendering with `Alert` component for consistent styling and improved readability. This aligns with reusable UI practices and modernizes the design.
streamline `Oracle` page text and layout for clarity. Updated styling makes the UI more cohesive and improves user experience.
reorganize text elements for better clarity and user readability. Updated layout ensures consistent styling and enhances user experience.
refine spacing and remove redundant class for cleaner layout. This improves visual consistency and enhances user experience.
improve spacing by replacing `lg` classes with `md` classes for better responsiveness. This enhances layout consistency across mid-sized screens.
add new progress component dependency for enhanced UI capabilities. This prepares for future functionality requiring progress indicators.
introduce new `Progress` component with Radix integration for consistent progress indicator styling. Enhances UI capabilities and prepares for future usage.
add `Progress` component to display block time countdown visually. Improves user feedback and enhances page aesthetics.
7de3748 to
feff95b
Compare





It's related to #1045.