From d8776aae06bf090f97f92a512c58446c95b7201b Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Mon, 25 May 2026 13:39:08 +0200 Subject: [PATCH] feat(widget)!: remove deprecated _vcComponent from WidgetFeeConfig The internal _vcComponent field on WidgetFeeConfig is no longer needed. Removes the field, the rendering branch in StatusBottomSheet, and the related comment in widget-light's mirror. Refs EMB-389 --- packages/widget-light/src/shared/widgetConfig.ts | 2 +- .../widget/src/pages/TransactionPage/StatusBottomSheet.tsx | 7 +------ packages/widget/src/types/widget.ts | 6 ------ 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/packages/widget-light/src/shared/widgetConfig.ts b/packages/widget-light/src/shared/widgetConfig.ts index 198b48972..544d3008e 100644 --- a/packages/widget-light/src/shared/widgetConfig.ts +++ b/packages/widget-light/src/shared/widgetConfig.ts @@ -219,7 +219,7 @@ export type WidgetTokens = { // --------------------------------------------------------------------------- // Fee configuration — serializable subset. -// Excluded: feeTooltipComponent (ReactNode), calculateFee (fn), _vcComponent +// Excluded: feeTooltipComponent (ReactNode), calculateFee (fn) // --------------------------------------------------------------------------- export interface WidgetFeeConfig { diff --git a/packages/widget/src/pages/TransactionPage/StatusBottomSheet.tsx b/packages/widget/src/pages/TransactionPage/StatusBottomSheet.tsx index 61b65f380..6dc79e647 100644 --- a/packages/widget/src/pages/TransactionPage/StatusBottomSheet.tsx +++ b/packages/widget/src/pages/TransactionPage/StatusBottomSheet.tsx @@ -73,7 +73,6 @@ const StatusBottomSheetContent: React.FC = ({ subvariantOptions, contractSecondaryComponent, contractCompactComponent, - feeConfig, } = useWidgetConfig() const { getChainById } = useAvailableChains() @@ -207,9 +206,6 @@ const StatusBottomSheetContent: React.FC = ({ hasEnumFlag(status, RouteExecutionStatus.Done) && (contractCompactComponent || contractSecondaryComponent) - const VcComponent = - status === RouteExecutionStatus.Done ? feeConfig?._vcComponent : undefined - return ( = ({ flexDirection: 'column', gap: 2, marginTop: 2, - marginBottom: VcComponent ? 2 : 3, + marginBottom: 3, }} > = ({ )} - {VcComponent ? : null} ) : null} diff --git a/packages/widget/src/types/widget.ts b/packages/widget/src/types/widget.ts index 5d70786b3..458e3385d 100644 --- a/packages/widget/src/types/widget.ts +++ b/packages/widget/src/types/widget.ts @@ -6,7 +6,6 @@ import type { ExtendedChain, Order, Route, - RouteExtended, RouteOptions, SDKConfig, StaticToken, @@ -25,7 +24,6 @@ import type { import type { TypographyVariantsOptions } from '@mui/material/styles' import type { CSSProperties, - FC, PropsWithChildren, ReactNode, RefObject, @@ -223,10 +221,6 @@ export interface WidgetFeeConfig { * @returns A promise that resolves to the calculated fee as a number (e.g., 0.03 represents a 3% fee) */ calculateFee?(params: CalculateFeeParams): Promise - /** - * @internal - */ - _vcComponent?: FC<{ route: RouteExtended }> } export interface ToAddress {