Skip to content

Conversation

mithatakbulut
Copy link
Contributor

@mithatakbulut mithatakbulut commented Sep 17, 2025

  • Added support for WaaS fee options in the FallbackPurchaseUI component.
  • Integrated useSelectWaasFeeOptions and selectWaasFeeOptionsStore for managing fee visibility and selection.
  • Updated the buy button label dynamically based on the selected fee option.
  • Improved transaction handling by showing fee options when applicable, particularly for non-testnet environments.
  • Refactored conditional rendering for the buy button and fee options to enhance user experience.

Market Purchase (testnet + mainnet) - WAAS

mainnet.-.market.-waas.mov
testnet.-.market.-.waas.mov

Shop Purchase (testnet + mainnet) - WAAS

shop.-.waas.mov

- Added support for WaaS fee options in the FallbackPurchaseUI component.
- Integrated `useSelectWaasFeeOptions` and `selectWaasFeeOptionsStore` for managing fee visibility and selection.
- Updated the buy button label dynamically based on the selected fee option.
- Improved transaction handling by showing fee options when applicable, particularly for non-testnet environments.
- Refactored conditional rendering for the buy button and fee options to enhance user experience.
@mithatakbulut mithatakbulut self-assigned this Sep 17, 2025
…label handling

- Removed unused imports related to network type checks.
- Simplified the logic for determining button labels for approval and purchase actions.
- Enhanced conditional rendering for action buttons based on transaction states and WaaS integration.
- Improved user feedback by dynamically updating button labels during transaction processing.
@mithatakbulut mithatakbulut marked this pull request as draft September 18, 2025 11:39
nuqs: ^2.6.0
react: ^19.1.1
react-day-picker: ^9.9.0
0xtrails: ^0.1.6
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I temporarily removed it to work in peace. I will take it back when PR is done.

@mithatakbulut
Copy link
Contributor Author

It auto selects an available fee option. If WaaS account doesn't have balance to afford any of the fee options, it fails executing the transaction 👇🏼 (the log in console shows native balance and usdc balance in Polygon respectively)

Screen.Recording.2025-09-19.at.12.23.56.mov

- Modified the `onSuccessCallback` type to accept both `Hash` and `string` for the `hash` parameter.
- Updated the `handleTransactionSuccess` function to handle the new hash type.
- Adjusted type annotations in `BuyModalContent` to ensure compatibility with the updated hash handling.

These changes enhance the flexibility of the BuyModal component in handling transaction success scenarios.
…lity with onSuccess callbacks

- Updated the `onSuccess` handler in `useGenerateCancelTransaction`, `useGenerateListingTransaction`, and `useGenerateSellTransaction` to ensure that only the data (steps) is passed to the user's callback.
- Removed unnecessary parameters from test cases in the corresponding test files to streamline assertions.
@mithatakbulut mithatakbulut marked this pull request as ready for review September 19, 2025 10:13
@mithatakbulut
Copy link
Contributor Author

Tests of some of the transaction hooks (createListing, sell, cancel) were failing (https://github.com/0xsequence/marketplace-sdk/actions/runs/17854875009/job/50771510783) and I made changes to both their test files and generateXxx hooks, which are not breaking or anything: dadcb13

…chaseUI

- Introduced a new `ErrorLogBox` component to display error messages with an option to view full error details.
- Updated `FallbackPurchaseUI` to manage error states, replacing toast notifications with the `ErrorLogBox` for better user experience.
- Implemented error handling for invalid steps and transaction failures, providing detailed error information to users.
- Ensured that previous errors are cleared before new actions are executed, maintaining a clean error state.
@mithatakbulut mithatakbulut marked this pull request as draft September 22, 2025 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants