Skip to content

Commit 1047ecf

Browse files
committed
Clean up
1 parent 657712c commit 1047ecf

4 files changed

Lines changed: 9 additions & 10 deletions

File tree

packages/checkout/widgets-lib/src/widgets/swap/SwapWidget.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
TokenFilterTypes, IMTBLWidgetEvents, SwapWidgetParams,
1111
SwapDirection,
1212
WalletProviderName,
13-
SwapWidgetConfiguration,
1413
} from '@imtbl/checkout-sdk';
1514
import { useTranslation } from 'react-i18next';
1615
import { SwapCoins } from './views/SwapCoins';
@@ -60,7 +59,7 @@ import { GeoblockLoader } from './GeoblockLoader';
6059

6160
export type SwapWidgetInputs = SwapWidgetParams & {
6261
config: StrongCheckoutWidgetsConfig;
63-
swapConfig: SwapWidgetConfiguration;
62+
swapConfig: { showTitle: boolean; showSubTitle: boolean };
6463
};
6564

6665
export default function SwapWidget({

packages/checkout/widgets-lib/src/widgets/swap/SwapWidgetRoot.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ export class Swap extends Base<WidgetType.SWAP> {
107107
showBackButton={this.parameters.showBackButton}
108108
walletProviderName={this.parameters.walletProviderName}
109109
swapConfig={{
110-
showTitle: this.properties.config?.showTitle,
111-
showSubTitle: this.properties.config?.showSubTitle,
110+
showTitle: this.properties.config?.showTitle ?? true,
111+
showSubTitle: this.properties.config?.showSubTitle ?? true,
112112
}}
113113
/>
114114
</Suspense>

packages/checkout/widgets-lib/src/widgets/swap/views/SwapCoins.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ export interface SwapCoinsProps {
3232
fromTokenAddress?: string;
3333
toTokenAddress?: string;
3434
showBackButton?: boolean;
35-
showTitle?: boolean;
36-
showSubTitle?: boolean;
35+
showTitle: boolean;
36+
showSubTitle: boolean;
3737
}
3838

3939
export function SwapCoins({
@@ -44,8 +44,8 @@ export function SwapCoins({
4444
fromTokenAddress,
4545
toTokenAddress,
4646
showBackButton,
47-
showTitle = true,
48-
showSubTitle = true,
47+
showTitle,
48+
showSubTitle,
4949
}: SwapCoinsProps) {
5050
const { t } = useTranslation();
5151
const { viewDispatch } = useContext(ViewContext);

packages/checkout/widgets-sample-app/src/components/ui/checkout/checkout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ function CheckoutUI() {
288288
theme,
289289
language,
290290
SWAP: {
291-
showTitle: false,
292-
showSubTitle: false,
291+
// showTitle: false,
292+
// showSubTitle: false,
293293
},
294294
// TRANSFER: {
295295
// // showTitle: false,

0 commit comments

Comments
 (0)