From 72598e6a0665a2be5727ef8b4f87709b34d31041 Mon Sep 17 00:00:00 2001 From: shoom3301 Date: Wed, 17 Jun 2026 15:12:30 +0500 Subject: [PATCH] feat: update widget docs with new parameters --- docs/cow-protocol/tutorials/widget/widget.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/cow-protocol/tutorials/widget/widget.md b/docs/cow-protocol/tutorials/widget/widget.md index b8b65dde1..d880ba7d7 100644 --- a/docs/cow-protocol/tutorials/widget/widget.md +++ b/docs/cow-protocol/tutorials/widget/widget.md @@ -366,6 +366,8 @@ createCowSwapWidget(document.getElementById('cowswap-widget'), { | `hideRecentTokens` | `boolean` | false | Hides the "Recent tokens" section in the token selector. | | `hideFavoriteTokens` | `boolean` | false | Hides the "Favorite tokens" section in the token selector. | | `disableTokenImport` | `boolean` | false | Disables adding custom tokens and custom token lists by the user. | +| `disableEIP2612Permits` | `boolean` | false | Disables the EIP-2612 permit signing flow. When `true`, the widget never signs an off-chain permit and always sends an on-chain approval transaction, even for tokens that support permit. | +| `disableInfiniteApprove` | `boolean` | false | Disables infinite (`MAX_UINT256`) ERC-20 approvals. When `true`, every approval transaction approves only the exact trade-size amount, and the "Partial approval" toggle in Settings is shown but locked on. | | `partnerFee` | `PartnerFee` | --- | Enables a fee for all trades in the widget. See [Partner fee](#partner-fee) section for more details. | | `slippage` | `FlexibleSlippageConfig` | --- | Sets slippage settings globally or per network. See [Slippage configuration](#slippage-configuration) section for more details. | | `disableTrade` | `object` | --- | Conditions to control the ability to trade. Accepts `{ whenPriceImpactIsUnknown?: boolean, whenPriceImpactIsHigherThan?: number }`. | @@ -375,6 +377,7 @@ createCowSwapWidget(document.getElementById('cowswap-widget'), { | `disableProgressBar` | `boolean` | false | Disables the progress bar shown after a swap order is placed. | | `disablePostTradeTips` | `boolean` | false | Disables CoW Swap educational tips shown after a trade completes. | | `disableCrossChainSwap` | `boolean` | false | Disables cross-chain swaps (aka Swap and Bridge) feature. | +| `disableCustomRecipient` | `boolean` | false | Disables setting a custom recipient for all trading widgets (swap, limit, twap). Note: cross-chain swaps rely on custom recipient functionality, so set `disableCrossChainSwap` to `true` as well if you want the recipient to always equal the order owner. | | `disableWindowOpen` | `boolean` | false | When `true`, the host page will not use `window.open` to open links requested by the widget. | | `standaloneMode` | `boolean` | false | When enabled, the widget uses its own Ethereum provider and the user can connect a wallet from within the widget. | | `hideNetworkSelector` | `boolean` | false | Hides the network selector in the widget UI. | @@ -384,6 +387,7 @@ createCowSwapWidget(document.getElementById('cowswap-widget'), { | `sounds` | `CowSwapWidgetSounds` | --- | Configure notification sounds. Provide a URL to an audio file, or set to `null` to disable a sound. See [Sounds](#sounds) section for more details. | | `images` | `CowSwapWidgetImages` | --- | Replace default widget images (e.g. the empty orders illustration). See [Images](#images) section for more details. | | `content` | `CowSwapWidgetContent` | --- | Customizable labels and content. Allows overriding the fee label (`feeLabel`) and fee tooltip markdown (`feeTooltipMarkdown`). | +| `hooks` | `object` | --- | Hooks invoked before key actions, each returning a `boolean` (or `Promise`) to allow or block the action: `onBeforeApproval`, `onBeforeWrapOrUnwrap`, `onBeforeTrade`, `onBeforeOrderCancel`, `onBeforeOrdersCancel`. | ## Custom theme