Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ import { WidgetConfiguration } from './widget';
export type SwapWidgetConfiguration = {
customTitle?: string;
customSubTitle?: string;
showHeader?: boolean;
} & WidgetConfiguration;
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default function SwapWidget({
autoProceed,
direction,
showBackButton,
swapConfig: { customTitle, customSubTitle },
swapConfig: { customTitle, customSubTitle, showHeader },
walletProviderName,
}: SwapWidgetInputs) {
const { t } = useTranslation();
Expand Down Expand Up @@ -260,6 +260,7 @@ export default function SwapWidget({
fromTokenAddress={viewState.view.data?.fromTokenAddress ?? fromTokenAddress}
toTokenAddress={viewState.view.data?.toTokenAddress ?? toTokenAddress}
showBackButton={showBackButton}
showHeader={showHeader ?? true}
title={customTitle ?? t('views.SWAP.header.title')}
subTitle={customSubTitle ?? t('views.SWAP.content.title')}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export class Swap extends Base<WidgetType.SWAP> {
swapConfig={{
customTitle: this.properties.config?.customTitle,
customSubTitle: this.properties.config?.customSubTitle,
showHeader: this.properties.config?.showHeader,
}}
/>
</Suspense>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export interface SwapCoinsProps {
fromTokenAddress?: string;
toTokenAddress?: string;
showBackButton?: boolean;
showHeader?: boolean;
title: string;
subTitle: string;
}
Expand All @@ -44,6 +45,7 @@ export function SwapCoins({
fromTokenAddress,
toTokenAddress,
showBackButton,
showHeader,
title,
subTitle,
}: SwapCoinsProps) {
Expand Down Expand Up @@ -90,7 +92,7 @@ export function SwapCoins({

return (
<SimpleLayout
header={!autoProceed ? (
header={!autoProceed && showHeader ? (
<HeaderNavigation
title={title}
onCloseButtonClick={() => sendSwapWidgetCloseEvent(eventTarget)}
Expand All @@ -103,7 +105,7 @@ export function SwapCoins({
);
}}
/>
) : ''}
) : undefined}
footer={<QuickswapFooter environment={checkout?.config.environment} theme={theme} />}
>
<Box
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,14 @@ function CheckoutUI() {
config: {
theme,
language,
/*
SWAP: {
showHeader: true,
},
*/
CONNECT: {

},
// SWAP: {},
TRANSFER: {
customTitle: "Dromedary Transfer",
},
Expand Down