-
Notifications
You must be signed in to change notification settings - Fork 0
Trails #541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Trails #541
Conversation
- Updated BuyModalContent to utilize the new useMarketOrderData hook for fetching collectible and currency information when the selected chain is unsupported. - Improved loading state management by consolidating loading checks into a single variable. - Enhanced fallback UI to ensure all necessary data (collectible, order, currency, calldata) is available before rendering. Additionally, added the useMarketOrderData hook to manage market order data retrieval, including error handling and loading states.
- Introduced the `useOrders` hook to facilitate fetching orders from the marketplace with customizable parameters. - Created the `fetchOrders` function to interact with the marketplace API and retrieve order data. - Added `ordersQueryOptions` to manage query configurations for fetching orders. - Removed the obsolete `useCheckoutOptions` hook to streamline the codebase and improve maintainability. - Updated `useMarketOrderData` to utilize the new `useOrders` hook for fetching order data, enhancing the integration with the BuyModal. This commit enhances the order management capabilities within the application, providing a more efficient way to handle order data retrieval.
Simple buy modal -> Trails
…integration. Updated price display to use formattedPrice and replaced img tag with Media component for better asset handling.
…nAddress to the returned data from useBuyModalData. Updated import paths for useSupportedChains to align with the new package structure.
Fallback buy modal UI fix
…out opacity because it's used in background of dropdowns as well
remove opacity from --trails-bg-secondary and replace with matching color
|
||
const isLoading = isLoadingSteps || isLoadingChains || isBuyModalDataLoading; | ||
|
||
const buyStep = steps?.find((step) => step.id === 'buy'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional:
StepType.buy
instead of 'buy'
|
||
const config = useConfig(); | ||
|
||
const formattedAmount = currency?.decimals |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably I should have done better check here. Instead of default amount to "0", I should have return an error saying currency.decimals
couldn't find.
queryFn: async () => { | ||
if (!address || !publicClient) return; | ||
|
||
const balance = nativeToken |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have useCurrencyBalance
. You can pass zeroAddress from viem
is it's native currency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we need an async version?
… checks in the enabled condition, ensuring sufficient balance validation is more robust.
… data retrieval. Added support for shop properties and adjusted collectibleId logic to handle items array. Enhanced error handling by including collectionError in the isError state.
…d improving price display logic. Added FallbackPurchaseUISkeleton for loading indication, updated price calculations to handle market and sale scenarios, and refined balance checks to account for loading states.
Trails shop fallback UI
…nd integrating tooltips for better user experience. Introduced renderPriceUSD and renderCurrencyPrice functions to improve price display, ensuring accurate representation of free and low-value items.
…lay-enhancement Enhance FallbackPurchaseUI by adding currency price rendering logic a…
…I for transaction execution
…ransaction status modal state - Adjusted error handling in BuyModalContent to check for order existence based on market status.
…cution - Added useToast for user notifications. - Implemented validation for required parameters (data, to, value) in executeTransaction function. - Improved error messaging to provide detailed context when validation fails.
Fix - Fallback Purchase Modal -> Txn status modal display
No description provided.