fix: Do not show error message if payWithExchange is not enabled#4908
fix: Do not show error message if payWithExchange is not enabled#4908
Conversation
🦋 Changeset detectedLatest commit: 1aa8a0a The changes in this PR will be included in the next version bump. This PR includes changesets to release 24 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
10 Skipped Deployments
|
|
This is a bit weird, why do we have |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an issue where error messages would be shown when payWithExchange feature is not enabled. The fix adds conditional checks to prevent unnecessary API calls and error handling for disabled features.
- Added conditional checks for payWithExchange feature enablement before calling exchange-related functionality
- Modified fetchExchanges method to early return when payWithExchange is not enabled
- Updated the fund wallet view to conditionally initialize exchange-related operations
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
packages/scaffold-ui/src/views/w3m-fund-wallet-view/index.ts |
Added conditional logic to only set default payment asset and fetch exchanges when payWithExchange is enabled |
packages/controllers/src/controllers/ExchangeController.ts |
Modified fetchExchanges method to early return when payWithExchange feature is not enabled |
packages/controllers/tests/controllers/ExchangeController.test.ts |
Added test coverage for the new conditional behavior in fetchExchanges |
.changeset/khaki-experts-yell.md |
Added changelog entry describing the fix |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@lukaisailovic it's a naming thing as that's what the flag is called cloud side. |
Description
Type of change
Checklist