Skip to content

Commit 3183ac5

Browse files
committed
fix: default quote source
1 parent 337ee79 commit 3183ac5

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [1.7.1] - 2026-04-23
2+
3+
### Fixed
4+
5+
- Fixed `No providers available for quoteSource="zap"` error on CMC20/BSC below the minimum input value. The minimum-input skip rule now only applies to `best` mode; explicit provider selection (Zap, Odos, Velora, Enso) is always honored
6+
17
## [1.7.0] - 2026-04-23
28

39
### Added

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@reserve-protocol/react-zapper",
3-
"version": "1.7.0",
3+
"version": "1.7.1",
44
"type": "module",
55
"description": "React component for DTF minting with zap functionality",
66
"main": "dist/index.cjs.js",

src/hooks/useZapSwapQuery.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,16 @@ const useZapSwapQuery = ({
9090
dtf?.id?.toLowerCase() ?? ''
9191
) ?? false) && inputValue < MIN_INPUT_VALUE_FOR_ZAP
9292

93-
// Providers available on this chain, filtered by the "skip zap" business
94-
// rule. The `best` mode will parallel-query all of these.
93+
// Providers available on this chain. The `shouldSkipZapper` rule only
94+
// affects the parallel `best` pool — when the user explicitly picks a
95+
// provider, honor that choice regardless of the skip rule.
9596
const availableProviders = useMemo<ProviderConfig[]>(() => {
9697
const providers = getEnabledProviders(chainId)
97-
return shouldSkipZapper ? providers.filter((p) => p.id !== 'zap') : providers
98-
}, [chainId, shouldSkipZapper])
98+
if (quoteSource !== 'best') return providers
99+
return shouldSkipZapper
100+
? providers.filter((p) => p.id !== 'zap')
101+
: providers
102+
}, [chainId, shouldSkipZapper, quoteSource])
99103

100104
// Cache key for react-query — changes when any swap param changes. We
101105
// intentionally don't memoize endpoint strings here; `fetchBestZapQuote`

0 commit comments

Comments
 (0)