Skip to content

Commit 3669e79

Browse files
authored
feat(checkout): send referrer domain to create the widget URL (#2740)
1 parent 3567e8c commit 3669e79

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

packages/checkout/sdk/src/fiatRamp/fiatRamp.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export class FiatRampService {
5050
)) as OnRampConfig;
5151

5252
const createWidgetUrl = `${IMMUTABLE_API_BASE_URL[this.config.environment]}/checkout/v1/widget-url`;
53+
5354
let widgetParams: Record<string, any> = {
5455
api_key: onRampConfig[OnRampProvider.TRANSAK].publishableApiKey,
5556
network: 'immutablezkevm',
@@ -60,6 +61,7 @@ export class FiatRampService {
6061
theme_color: 'FFFFFF', // this only controls the background colour of the Buy button
6162
default_crypto_currency: params.tokenSymbol || 'IMX',
6263
hide_menu: !(params.showMenu ?? true),
64+
referrer_domain: window.location.origin,
6365
};
6466

6567
if (params.isPassport && params.email) {

packages/checkout/widgets-lib/src/components/Transak/useTransakIframe.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ export const useTransakIframe = (props: UseTransakIframeProps) => {
109109
exchange_screen_title: exchangeScreenTitle,
110110
wallet_address: walletAddress,
111111
partner_order_id: partnerOrderId,
112+
referrer_domain: window.location.origin,
112113
};
113114

114115
if (email) {

0 commit comments

Comments
 (0)