v2.0.0
Breaking Changes
-
Removed the
wagmiConfigprop. The Zapper no longer creates its ownWagmiProviderandQueryClient/QueryClientProvider; it now consumes the host application'swagmiand@tanstack/react-querycontext via hooks. Wrap your app in your ownWagmiProvider+QueryClientProviderand drop thewagmiConfigprop:// Before (v1) <Zapper wagmiConfig={wagmiConfig} chain={1} dtfAddress="0x..." /> // After (v2) — render inside your existing providers <WagmiProvider config={wagmiConfig}> <QueryClientProvider client={queryClient}> <Zapper chain={1} dtfAddress="0x..." /> </QueryClientProvider> </WagmiProvider>
Added
useQuote()hook exposing the Zapper's live quote state as{ data, loading, error }, so consumers can build their own UI around the Zapper (status banners, custom loaders, analytics).datais{ input: { token, amount, value }, quote, source }—input(including its USDvalue) is available as soon as the user types, whilequote/sourcepopulate once a quote resolves. Also exports theQuoteData,QuoteInput,UseQuoteResult, andZapResulttypes.
Changed
reactandreact-domare nowpeerDependencies(previously bundled independencies), preventing duplicate-React issues in host apps. Removed the unused@tanstack/query-coredependency.- Bumped peer floors to
wagmi ^2.19.0andviem ^2.50.0; the package is now built and tested againstwagmi 2.19.5+viem 2.50.4. - Raised the pnpm
minimumReleaseAgesupply-chain guard from 24h to 7 days.
Fixed
usePricenow returns native-token prices (ETH, BNB, Base ETH). It was rewriting the native sentinel address (0xEeee…EEeE) to the zero address before calling the Reserve price API, which has no price at the zero address — zeroing out every native-token price on all chains.