Releases: coinbase/onchainkit
v0.33.1
v0.33.0
Minor Changes
-
8904699: - feat: set v2 as default API for Swap. by @0xAlec #1254
- chore: updated
SwapSettingsSlippageInput
to use the input config defaultMaxSlippage value. By @cpcramer #1263 - feat: added batched Swap transactions from ERC-20. by @0xAlec #1272
Breaking Changes
Updated
LifecycleStatus
inSwap
component for swaps from ERC-20 tokens.
Previously, there were 2 transactions when swapping from an ERC-20 token.
Now, there is an extra approval. (Approve ERC-20 against Permit2 -> Approve Uniswap to spend the approved ERC-20s on Permit2 -> Execute Swap Transaction)
Additionally, for Coinbase Smart Wallet users, transaction calls are now batched so only onetransactionApproved
lifecycle status will be emitted under theBatched
transaction type for swaps from ERC-20s.
If you're listening to theLifecycleStatus
inSwap
, please make sure your app accounts for the extra transaction. - chore: updated
v0.32.0
Minor Changes
- feat: re-typed walletCapabilities object in
OnchainKitConfig
. By @0xAlec #1238 - fix: removed
mt-4
from<TransactionButton>
, ensuring the primary component maintains a clean and consistent design without outer margin. By @Zizzamia #1258 - fix: renamed LifeCycle to Lifecycle. By @Zizzamia #1257
- fix:
SwapSlippageInput
was visually resetting to default value on error. By @cpcramer #1250 - fix: removed context states and use
lifecyclestatus
as the source of truth, also persisted all lifecycle status data (except errors). By @alessey #1249 - fix: extracting
SwapMessage
to constants to avoid circular dependency. By @alessey #1255 - feat: enhanced Framegear Home component with layout, loading state, and placeholder improvements. By @adarshswaminath #1241
Breaking Changes
Removed walletCapabilities
from the OnchainKitConfig
and improved the internal types by using the native Viem wallet capabilities type. This update ensures that wallet capabilities are now used solely as read info, avoiding accidental changes to wallet capabilities.
The <TransactionButton>
will no longer have a preset margin, allowing you to customize your app's spacing. Please check your app to see if you need to add a 4px margin. We aim to provide more neutral spacing, giving you the flexibility to add margin as needed.
The LifeCycleStatus
type is now renamed LifecycleStatus
. This update aligns with React's lifecycle naming best practices, ensuring a smoother experience with your app. Please take note of this improvement.
v0.31.6
Patch Changes
- 6147155: - feat: added custom max slippage support in the
Swap
component along with a new settings dropdown UI. By @cpcramer #1176 #1248- feat: added type
LifecycleStatusDataShared
to theLifeCycleStatus
to hold shared lifeCycle state. By @Zizzamia #1234 #1240 - feat: introduced
config
for theSwap
component, with the first option formaxSlippage
. By @Zizzamia & @cpcramer #1242 - fix: added spacing between swap input and token select. By @alessey #1229
- feat: added type
v0.31.5
v0.31.4
Patch Changes
- 63742da: - feat: added support for
EIP-5792
(https://eips.ethereum.org/EIPS/eip-5792) inOnchainKitProvider
. By @0xAlec #1181
v0.31.3
Patch Changes
- a417d30: - feat: added
buildPayTransaction
utilities for making RPC calls to hydrate a charge and build a pay transaction in preparation forPay
button. By @avidreder #1177- feat: implemented custom slippage support sub-components in the
Swap
component. By @cpcramer #1187 #1192 #1191 #1195 #1196 #1206 - docs: added Build Onchain Apps guide using OnchainKit's
app template
. By @Zizzamia #1202 - fix: updated v1
Swap
API to pass the correct slippage unit of measurement. By @cpcramer #1189
- feat: implemented custom slippage support sub-components in the
v0.31.2
Patch Changes
- ef6e936: - feat: added connect wallet functionality to Swap component for disconnected users. By @abcrane123 #1173
- fix: added logic to refetch balances and clear inputs after Swap succeeds. By @0xAlec #1089
- fix: adjusted Swap component style to prevent UI shifting. By @abcrane123 #1184
v0.31.1
Patch Changes
v0.31.0
Minor Changes
-
4382d93: - fix: error message in
Swap
experience. By @Zizzamia & @0xAlec #1154 #1153 #1155- fix: removed
address
prop fromSwap
component. By @abcrane123 #1145 - feat: moving
getTokens
,buildSwapTransaction
andgetSwapQuote
under the API module. By @Zizzamia #1146 #1151 - fix: handled SSR hydration issues. By @abcrane123 #1117
Breaking Changes
We streamlined theSwap
experience to match theTransaction
experience by eliminating the need for anaddress
prop, making it work automatically.All APIs within OnchainKit are now consolidated under the
@coinbase/onchainkit/api
module. There's no change in functionality; simply import them from theapi
module. - fix: removed