@imtbl/checkout-widgets 2.7.6-alpha.3 → 2.7.6-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/browser/{AddTokensWidget-BtCxQDre.js → AddTokensWidget-Cz-3P4n8.js} +10 -10
  2. package/dist/browser/{BridgeWidget-BqQopDTq.js → BridgeWidget-DwaaBUiy.js} +21 -21
  3. package/dist/browser/{CommerceWidget-BK9R-_9f.js → CommerceWidget-r3ceeFjn.js} +14 -14
  4. package/dist/browser/{FeesBreakdown-D__BZ8Ob.js → FeesBreakdown-CYHYY0E5.js} +1 -1
  5. package/dist/browser/{OnRampWidget-Dc-1o5O-.js → OnRampWidget-DhyoYuwo.js} +3 -3
  6. package/dist/browser/{SaleWidget-Dg431ujg.js → SaleWidget-C_iXIOAD.js} +10 -10
  7. package/dist/browser/{SpendingCapHero-CuqaDLDZ.js → SpendingCapHero-BlahRW7H.js} +1 -1
  8. package/dist/browser/{SwapWidget-BwEhCOrV.js → SwapWidget-CtxMh18w.js} +15 -15
  9. package/dist/browser/{TokenImage-C0Tdpr1x.js → TokenImage-BUwvAHwB.js} +1 -1
  10. package/dist/browser/{TopUpView-CmomVZKf.js → TopUpView-D0va9-8b.js} +1 -1
  11. package/dist/browser/{WalletApproveHero-DbwKxQoK.js → WalletApproveHero-DaynhYwW.js} +7 -7
  12. package/dist/browser/{WalletWidget-CbYlmBoD.js → WalletWidget-DEuyTfsr.js} +3 -3
  13. package/dist/browser/{auto-track-CW786a-6.js → auto-track-BCQXdiGN.js} +1 -1
  14. package/dist/browser/{index-B7uWWX7Q.js → index-BFxLOsUu.js} +1 -1
  15. package/dist/browser/{index-pznR1IOV.js → index-CF-oCXQz.js} +2 -2
  16. package/dist/browser/{index-e-IfGJ6a.js → index-Cjtm0BWc.js} +1 -1
  17. package/dist/browser/{index-DWOPOCgF.js → index-Cn4K5cCQ.js} +1 -1
  18. package/dist/browser/{index-4Mt0QsgH.js → index-DLD2fApU.js} +1 -1
  19. package/dist/browser/{index-BiXL-IXS.js → index-Dp2LchQR.js} +42 -40
  20. package/dist/browser/{index-DcGT4xg-.js → index-Z1ySY3CD.js} +1 -1
  21. package/dist/browser/{index-D5LoG06y.js → index-nziVmB-g.js} +1 -1
  22. package/dist/browser/index.js +1 -1
  23. package/dist/browser/{index.umd-D-GcL5BZ.js → index.umd-CAVRgQ_6.js} +1 -1
  24. package/dist/browser/{useInterval-Dpkv8i3Z.js → useInterval-BiJy2Gyo.js} +1 -1
  25. package/dist/types/components/CoinSelector/CoinSelector.d.ts +2 -1
  26. package/dist/types/components/FormComponents/SelectForm/SelectForm.d.ts +4 -3
  27. package/dist/types/components/FormComponents/SelectInput/SelectInput.d.ts +4 -3
  28. package/dist/types/components/Transactions/Transactions.d.ts +3 -1
  29. package/dist/types/components/WalletDrawer/ConnectWalletDrawer.d.ts +2 -1
  30. package/dist/types/components/WalletDrawer/DeliverToWalletDrawer.d.ts +2 -1
  31. package/dist/types/components/WalletDrawer/PayWithWalletDrawer.d.ts +2 -1
  32. package/dist/types/components/WalletDrawer/WalletDrawer.d.ts +2 -1
  33. package/dist/types/lib/withDefaultWidgetConfig.d.ts +11 -2
  34. package/dist/types/widgets/bridge/components/BridgeForm.d.ts +3 -2
  35. package/dist/types/widgets/bridge/components/WalletAndNetworkSelector.d.ts +4 -1
  36. package/dist/types/widgets/bridge/views/Bridge.d.ts +3 -2
  37. package/dist/types/widgets/bridge/views/WalletNetworkSelectionView.d.ts +3 -1
  38. package/dist/types/widgets/connect/components/WalletList.d.ts +2 -1
  39. package/dist/types/widgets/connect/views/ConnectWallet.d.ts +3 -2
  40. package/dist/types/widgets/purchase/components/PurchaseConnectWalletDrawer.d.ts +2 -1
  41. package/dist/types/widgets/purchase/components/PurchaseDeliverToWalletDrawer.d.ts +2 -1
  42. package/dist/types/widgets/purchase/components/PurchasePayWithWalletDrawer.d.ts +2 -1
  43. package/dist/types/widgets/purchase/views/Purchase.d.ts +3 -2
  44. package/dist/types/widgets/swap/components/SwapForm.d.ts +3 -2
  45. package/dist/types/widgets/swap/views/SwapCoins.d.ts +3 -2
  46. package/package.json +7 -7
  47. package/src/components/CoinSelector/CoinSelector.tsx +10 -3
  48. package/src/components/FormComponents/SelectForm/SelectForm.tsx +6 -3
  49. package/src/components/FormComponents/SelectInput/SelectInput.tsx +5 -3
  50. package/src/components/Transactions/Transactions.tsx +4 -0
  51. package/src/components/WalletDrawer/ConnectWalletDrawer.tsx +3 -0
  52. package/src/components/WalletDrawer/DeliverToWalletDrawer.tsx +3 -0
  53. package/src/components/WalletDrawer/PayWithWalletDrawer.tsx +3 -0
  54. package/src/components/WalletDrawer/WalletDrawer.tsx +4 -0
  55. package/src/context/view-context/test-components/ViewContextTestComponent.tsx +7 -0
  56. package/src/lib/withDefaultWidgetConfig.test.ts +20 -10
  57. package/src/lib/withDefaultWidgetConfig.ts +12 -2
  58. package/src/widgets/BaseWidgetRoot.ts +1 -0
  59. package/src/widgets/add-tokens/views/AddTokens.tsx +2 -0
  60. package/src/widgets/bridge/BridgeWidget.tsx +8 -2
  61. package/src/widgets/bridge/components/BridgeForm.tsx +5 -2
  62. package/src/widgets/bridge/components/WalletAndNetworkSelector.tsx +4 -2
  63. package/src/widgets/bridge/views/Bridge.tsx +4 -1
  64. package/src/widgets/bridge/views/WalletNetworkSelectionView.tsx +4 -2
  65. package/src/widgets/connect/ConnectWidget.tsx +1 -0
  66. package/src/widgets/connect/components/WalletList.tsx +4 -0
  67. package/src/widgets/connect/views/ConnectWallet.tsx +4 -1
  68. package/src/widgets/purchase/PurchaseWidget.tsx +1 -0
  69. package/src/widgets/purchase/components/PurchaseConnectWalletDrawer.tsx +3 -0
  70. package/src/widgets/purchase/components/PurchaseDeliverToWalletDrawer.tsx +3 -0
  71. package/src/widgets/purchase/components/PurchasePayWithWalletDrawer.tsx +3 -0
  72. package/src/widgets/purchase/views/Purchase.tsx +5 -0
  73. package/src/widgets/swap/SwapWidget.tsx +2 -0
  74. package/src/widgets/swap/components/SwapForm.tsx +5 -1
  75. package/src/widgets/swap/views/SwapCoins.tsx +4 -1
  76. package/src/widgets/transfer/TransferForm.tsx +2 -0
@@ -12,16 +12,18 @@ import {
12
12
 
13
13
  describe('withDefaultWidgetConfig', () => {
14
14
  it('empty config returns defaults', () => {
15
- expect(withDefaultWidgetConfigs({})).toEqual({
15
+ expect(withDefaultWidgetConfigs({} as any)).toEqual({
16
16
  theme: DEFAULT_THEME,
17
+ themeOverrides: {},
17
18
  environment: DEFAULT_ENV,
18
19
  isOnRampEnabled: DEFAULT_ON_RAMP_ENABLED,
19
20
  isSwapEnabled: DEFAULT_SWAP_ENABLED,
20
21
  isBridgeEnabled: DEFAULT_BRIDGE_ENABLED,
21
22
  isAddTokensEnabled: DEFAULT_ADD_TOKENS_ENABLED,
22
23
  });
23
- expect(withDefaultWidgetConfigs(undefined)).toEqual({
24
+ expect(withDefaultWidgetConfigs(undefined as any)).toEqual({
24
25
  theme: DEFAULT_THEME,
26
+ themeOverrides: {},
25
27
  environment: DEFAULT_ENV,
26
28
  isOnRampEnabled: DEFAULT_ON_RAMP_ENABLED,
27
29
  isSwapEnabled: DEFAULT_SWAP_ENABLED,
@@ -34,9 +36,10 @@ describe('withDefaultWidgetConfig', () => {
34
36
  expect(
35
37
  withDefaultWidgetConfigs({
36
38
  environment: Environment.PRODUCTION,
37
- }),
39
+ } as any),
38
40
  ).toEqual({
39
41
  theme: DEFAULT_THEME,
42
+ themeOverrides: {},
40
43
  environment: Environment.PRODUCTION,
41
44
  isOnRampEnabled: DEFAULT_ON_RAMP_ENABLED,
42
45
  isSwapEnabled: DEFAULT_SWAP_ENABLED,
@@ -46,9 +49,10 @@ describe('withDefaultWidgetConfig', () => {
46
49
  expect(
47
50
  withDefaultWidgetConfigs({
48
51
  isOnRampEnabled: false,
49
- }),
52
+ } as any),
50
53
  ).toEqual({
51
54
  theme: DEFAULT_THEME,
55
+ themeOverrides: {},
52
56
  environment: DEFAULT_ENV,
53
57
  isOnRampEnabled: false,
54
58
  isSwapEnabled: DEFAULT_SWAP_ENABLED,
@@ -61,9 +65,10 @@ describe('withDefaultWidgetConfig', () => {
61
65
  expect(
62
66
  withDefaultWidgetConfigs({
63
67
  environment: Environment.PRODUCTION,
64
- }),
68
+ } as any),
65
69
  ).toEqual({
66
70
  theme: DEFAULT_THEME,
71
+ themeOverrides: {},
67
72
  environment: Environment.PRODUCTION,
68
73
  isOnRampEnabled: DEFAULT_ON_RAMP_ENABLED,
69
74
  isSwapEnabled: DEFAULT_SWAP_ENABLED,
@@ -74,9 +79,10 @@ describe('withDefaultWidgetConfig', () => {
74
79
  expect(
75
80
  withDefaultWidgetConfigs({
76
81
  environment: Environment.SANDBOX,
77
- }),
82
+ } as any),
78
83
  ).toEqual({
79
84
  theme: DEFAULT_THEME,
85
+ themeOverrides: {},
80
86
  environment: Environment.SANDBOX,
81
87
  isOnRampEnabled: DEFAULT_ON_RAMP_ENABLED,
82
88
  isSwapEnabled: DEFAULT_SWAP_ENABLED,
@@ -87,9 +93,10 @@ describe('withDefaultWidgetConfig', () => {
87
93
  expect(
88
94
  withDefaultWidgetConfigs({
89
95
  environment: 'unknown' as Environment,
90
- }),
96
+ } as any),
91
97
  ).toEqual({
92
98
  theme: DEFAULT_THEME,
99
+ themeOverrides: {},
93
100
  environment: DEFAULT_ENV,
94
101
  isOnRampEnabled: DEFAULT_ON_RAMP_ENABLED,
95
102
  isSwapEnabled: DEFAULT_SWAP_ENABLED,
@@ -102,9 +109,10 @@ describe('withDefaultWidgetConfig', () => {
102
109
  expect(
103
110
  withDefaultWidgetConfigs({
104
111
  theme: WidgetTheme.DARK,
105
- }),
112
+ } as any),
106
113
  ).toEqual({
107
114
  theme: WidgetTheme.DARK,
115
+ themeOverrides: {},
108
116
  environment: DEFAULT_ENV,
109
117
  isOnRampEnabled: DEFAULT_ON_RAMP_ENABLED,
110
118
  isSwapEnabled: DEFAULT_SWAP_ENABLED,
@@ -115,9 +123,10 @@ describe('withDefaultWidgetConfig', () => {
115
123
  expect(
116
124
  withDefaultWidgetConfigs({
117
125
  theme: WidgetTheme.LIGHT,
118
- }),
126
+ } as any),
119
127
  ).toEqual({
120
128
  theme: WidgetTheme.LIGHT,
129
+ themeOverrides: {},
121
130
  environment: DEFAULT_ENV,
122
131
  isOnRampEnabled: DEFAULT_ON_RAMP_ENABLED,
123
132
  isSwapEnabled: DEFAULT_SWAP_ENABLED,
@@ -128,9 +137,10 @@ describe('withDefaultWidgetConfig', () => {
128
137
  expect(
129
138
  withDefaultWidgetConfigs({
130
139
  theme: 'unknown' as Environment,
131
- }),
140
+ } as any),
132
141
  ).toEqual({
133
142
  theme: DEFAULT_THEME,
143
+ themeOverrides: {},
134
144
  environment: DEFAULT_ENV,
135
145
  isOnRampEnabled: DEFAULT_ON_RAMP_ENABLED,
136
146
  isSwapEnabled: DEFAULT_SWAP_ENABLED,
@@ -1,5 +1,5 @@
1
1
  import { Environment } from '@imtbl/config';
2
- import { WidgetTheme } from '@imtbl/checkout-sdk';
2
+ import { ThemeOverrides, WidgetTheme } from '@imtbl/checkout-sdk';
3
3
  import {
4
4
  DEFAULT_ADD_TOKENS_ENABLED,
5
5
  DEFAULT_BRIDGE_ENABLED,
@@ -11,6 +11,7 @@ import {
11
11
 
12
12
  export type StrongCheckoutWidgetsConfig = {
13
13
  theme: WidgetTheme;
14
+ themeOverrides: ThemeOverrides;
14
15
  environment: Environment;
15
16
  isOnRampEnabled: boolean;
16
17
  isSwapEnabled: boolean;
@@ -38,9 +39,18 @@ function getValidBoolean(defaultValue: boolean, value?: string): boolean {
38
39
  }
39
40
 
40
41
  export const withDefaultWidgetConfigs = (
41
- configs?: any,
42
+ configs: {
43
+ theme: WidgetTheme | undefined;
44
+ themeOverrides: ThemeOverrides | undefined;
45
+ environment: Environment;
46
+ isOnRampEnabled: boolean;
47
+ isSwapEnabled: boolean;
48
+ isBridgeEnabled: boolean;
49
+ isAddTokensEnabled?: boolean; // TODO: why is this optional?
50
+ },
42
51
  ): StrongCheckoutWidgetsConfig => ({
43
52
  theme: getValidTheme(configs?.theme),
53
+ themeOverrides: configs?.themeOverrides ?? {},
44
54
  environment: getValidEnvironment(configs?.environment),
45
55
  isOnRampEnabled: getValidBoolean(
46
56
  DEFAULT_ON_RAMP_ENABLED,
@@ -191,6 +191,7 @@ export abstract class Base<T extends WidgetType> implements Widget<T> {
191
191
  protected strongConfig(): StrongCheckoutWidgetsConfig {
192
192
  return withDefaultWidgetConfigs({
193
193
  theme: this.properties.config?.theme,
194
+ themeOverrides: this.properties.config?.themeOverrides,
194
195
  environment: this.checkout.config.environment,
195
196
  isOnRampEnabled: this.checkout.config.isOnRampEnabled,
196
197
  isSwapEnabled: this.checkout.config.isSwapEnabled,
@@ -817,6 +817,7 @@ export function AddTokens({
817
817
  onConnect={handleWalletConnected}
818
818
  insufficientBalance={insufficientBalance}
819
819
  showOnRampOption={shouldShowOnRampOption || !selectedToken}
820
+ drawerBackground={config.themeOverrides?.drawerBackground}
820
821
  />
821
822
  <RouteOptionsDrawer
822
823
  checkout={checkout}
@@ -835,6 +836,7 @@ export function AddTokens({
835
836
  walletOptions={walletOptions}
836
837
  onClose={handleDeliverToClose}
837
838
  onConnect={handleWalletConnected}
839
+ drawerBackground={config.themeOverrides?.drawerBackground}
838
840
  />
839
841
  <OnboardingDrawer environment={checkout?.config.environment!} />
840
842
  </Stack>
@@ -85,6 +85,7 @@ export default function BridgeWidget({
85
85
  isSwapEnabled,
86
86
  isBridgeEnabled,
87
87
  theme,
88
+ themeOverrides,
88
89
  } = config;
89
90
  const defaultTokenImage = getDefaultTokenImage(checkout.config.environment, theme);
90
91
  const { eventTargetState: { eventTarget } } = useContext(EventTargetContext);
@@ -203,7 +204,7 @@ export default function BridgeWidget({
203
204
  <BridgeContext.Provider value={bridgeReducerValues}>
204
205
  <CryptoFiatProvider environment={environment}>
205
206
  {viewState.view.type === BridgeWidgetViews.WALLET_NETWORK_SELECTION && (
206
- <WalletNetworkSelectionView showBackButton={showBackButton} />
207
+ <WalletNetworkSelectionView showBackButton={showBackButton} themeOverrides={themeOverrides} />
207
208
  )}
208
209
  {viewState.view.type === BridgeWidgetViews.BRIDGE_FORM && (
209
210
  <Bridge
@@ -211,6 +212,7 @@ export default function BridgeWidget({
211
212
  tokenAddress={tokenAddress}
212
213
  defaultTokenImage={defaultTokenImage}
213
214
  theme={theme}
215
+ themeOverrides={themeOverrides}
214
216
  />
215
217
  )}
216
218
  {viewState.view.type === BridgeWidgetViews.BRIDGE_REVIEW && (
@@ -257,7 +259,11 @@ export default function BridgeWidget({
257
259
  />
258
260
  )}
259
261
  {viewState.view.type === BridgeWidgetViews.TRANSACTIONS && (
260
- <Transactions onBackButtonClick={goBackToWalletNetworkSelector} defaultTokenImage={defaultTokenImage} />
262
+ <Transactions
263
+ onBackButtonClick={goBackToWalletNetworkSelector}
264
+ defaultTokenImage={defaultTokenImage}
265
+ themeOverrides={themeOverrides}
266
+ />
261
267
  )}
262
268
  {viewState.view.type === BridgeWidgetViews.CLAIM_WITHDRAWAL && (
263
269
  <ClaimWithdrawal transaction={viewState.view.transaction} />
@@ -5,7 +5,7 @@ import {
5
5
  OptionKey,
6
6
  } from '@biom3/react';
7
7
  import {
8
- GetBalanceResult, WidgetTheme,
8
+ GetBalanceResult, ThemeOverrides, WidgetTheme,
9
9
  } from '@imtbl/checkout-sdk';
10
10
  import { parseUnits } from 'ethers';
11
11
  import {
@@ -49,7 +49,8 @@ interface BridgeFormProps {
49
49
  isTokenBalancesLoading?: boolean;
50
50
  defaultTokenImage: string;
51
51
  environment?: Environment;
52
- theme?: WidgetTheme;
52
+ theme: WidgetTheme;
53
+ themeOverrides: ThemeOverrides;
53
54
  }
54
55
 
55
56
  export function BridgeForm(props: BridgeFormProps) {
@@ -78,6 +79,7 @@ export function BridgeForm(props: BridgeFormProps) {
78
79
  defaultTokenImage,
79
80
  environment,
80
81
  theme,
82
+ themeOverrides,
81
83
  } = props;
82
84
 
83
85
  const { track } = useAnalytics();
@@ -389,6 +391,7 @@ export function BridgeForm(props: BridgeFormProps) {
389
391
  defaultTokenImage={defaultTokenImage}
390
392
  environment={environment}
391
393
  theme={theme}
394
+ themeOverrides={themeOverrides}
392
395
  />
393
396
  <TextInputForm
394
397
  testId="bridge-amount"
@@ -12,7 +12,7 @@ import {
12
12
  useState,
13
13
  } from 'react';
14
14
  import {
15
- ChainId, WalletProviderName, WalletProviderRdns, WrappedBrowserProvider,
15
+ ChainId, ThemeOverrides, WalletProviderName, WalletProviderRdns, WrappedBrowserProvider,
16
16
  } from '@imtbl/checkout-sdk';
17
17
  import { useTranslation } from 'react-i18next';
18
18
  import { BridgeWidgetViews } from '../../../context/view-context/BridgeViewContextTypes';
@@ -43,7 +43,7 @@ import { WalletChangeEvent } from '../../../components/WalletDrawer/WalletDrawer
43
43
 
44
44
  const testId = 'wallet-network-selector';
45
45
 
46
- export function WalletAndNetworkSelector() {
46
+ export function WalletAndNetworkSelector({ themeOverrides }: { themeOverrides: ThemeOverrides }) {
47
47
  const { t } = useTranslation();
48
48
  const {
49
49
  bridgeState: { checkout, from, to },
@@ -475,6 +475,7 @@ export function WalletAndNetworkSelector() {
475
475
  setShowDrawer={setFromWalletDrawerOpen}
476
476
  walletOptions={fromWalletSelectorOptions}
477
477
  onWalletChange={handleFromWalletConnection}
478
+ drawerBackground={themeOverrides.drawerBackground}
478
479
  />
479
480
 
480
481
  {/* From selections have been made */}
@@ -521,6 +522,7 @@ export function WalletAndNetworkSelector() {
521
522
  showDrawer={toWalletDrawerOpen}
522
523
  setShowDrawer={setToWalletDrawerOpen}
523
524
  onWalletChange={handleToWalletSelection}
525
+ drawerBackground={themeOverrides.drawerBackground}
524
526
  />
525
527
  </Box>
526
528
  </Box>
@@ -4,7 +4,7 @@ import {
4
4
  useEffect,
5
5
  useState,
6
6
  } from 'react';
7
- import { TokenFilterTypes, WidgetTheme } from '@imtbl/checkout-sdk';
7
+ import { ThemeOverrides, TokenFilterTypes, WidgetTheme } from '@imtbl/checkout-sdk';
8
8
  import { useTranslation } from 'react-i18next';
9
9
  import { UserJourney, useAnalytics } from '../../../context/analytics-provider/SegmentAnalyticsProvider';
10
10
  import { sendBridgeWidgetCloseEvent } from '../BridgeWidgetEvents';
@@ -24,6 +24,7 @@ export interface BridgeProps {
24
24
  tokenAddress?: string;
25
25
  defaultTokenImage: string;
26
26
  theme: WidgetTheme;
27
+ themeOverrides: ThemeOverrides;
27
28
  }
28
29
 
29
30
  export function Bridge({
@@ -31,6 +32,7 @@ export function Bridge({
31
32
  tokenAddress,
32
33
  defaultTokenImage,
33
34
  theme,
35
+ themeOverrides,
34
36
  }: BridgeProps) {
35
37
  const { t } = useTranslation();
36
38
  const { bridgeState, bridgeDispatch } = useContext(BridgeContext);
@@ -123,6 +125,7 @@ export function Bridge({
123
125
  defaultTokenImage={defaultTokenImage}
124
126
  environment={checkout?.config.environment}
125
127
  theme={theme}
128
+ themeOverrides={themeOverrides}
126
129
  />
127
130
  </SimpleLayout>
128
131
  );
@@ -1,7 +1,7 @@
1
1
  import { useContext, useEffect } from 'react';
2
2
  import { ButtCon } from '@biom3/react';
3
3
  import { useTranslation } from 'react-i18next';
4
- import { IMTBLWidgetEvents } from '@imtbl/checkout-sdk';
4
+ import { IMTBLWidgetEvents, ThemeOverrides } from '@imtbl/checkout-sdk';
5
5
  import { HeaderNavigation } from '../../../components/Header/HeaderNavigation';
6
6
  import { SimpleLayout } from '../../../components/SimpleLayout/SimpleLayout';
7
7
  import { FooterLogo } from '../../../components/Footer/FooterLogo';
@@ -16,9 +16,11 @@ import { orchestrationEvents } from '../../../lib/orchestrationEvents';
16
16
 
17
17
  type WalletNetworkSelectionViewProps = {
18
18
  showBackButton?: boolean;
19
+ themeOverrides: ThemeOverrides;
19
20
  };
20
21
  export function WalletNetworkSelectionView({
21
22
  showBackButton,
23
+ themeOverrides,
22
24
  }: WalletNetworkSelectionViewProps) {
23
25
  const { t } = useTranslation();
24
26
  const { viewDispatch } = useContext(ViewContext);
@@ -68,7 +70,7 @@ export function WalletNetworkSelectionView({
68
70
  )}
69
71
  footer={<FooterLogo />}
70
72
  >
71
- <WalletAndNetworkSelector />
73
+ <WalletAndNetworkSelector themeOverrides={themeOverrides} />
72
74
  </SimpleLayout>
73
75
  );
74
76
  }
@@ -225,6 +225,7 @@ export default function ConnectWidget({
225
225
  checkNetwork={isCheckNetworkEnabled ?? true}
226
226
  showBackButton={showBackButton}
227
227
  onBackButtonClick={sendGoBackEventOverride}
228
+ themeOverrides={config.themeOverrides}
228
229
  />
229
230
  )}
230
231
  {view.type === ConnectWidgetViews.SWITCH_NETWORK && isZkEvmChainId(targetChain) && (
@@ -7,6 +7,7 @@ import {
7
7
  WrappedBrowserProvider,
8
8
  WalletProviderName,
9
9
  WalletProviderRdns,
10
+ ThemeOverrides,
10
11
  } from '@imtbl/checkout-sdk';
11
12
  import {
12
13
  useCallback,
@@ -58,6 +59,7 @@ export interface WalletListProps {
58
59
  allowlistWalletRdns?: string[];
59
60
  blocklistWalletRdns: string[];
60
61
  isCheckNetworkEnabled: boolean;
62
+ themeOverrides: ThemeOverrides;
61
63
  }
62
64
 
63
65
  // eslint-disable-next-line max-len
@@ -73,6 +75,7 @@ export function WalletList(props: WalletListProps) {
73
75
  targetChainId,
74
76
  allowedChains,
75
77
  isCheckNetworkEnabled,
78
+ themeOverrides,
76
79
  allowlistWalletRdns,
77
80
  blocklistWalletRdns,
78
81
  } = props;
@@ -443,6 +446,7 @@ export function WalletList(props: WalletListProps) {
443
446
  setShowWalletDrawer(show);
444
447
  }}
445
448
  onWalletChange={handleWalletChange}
449
+ drawerBackground={themeOverrides.drawerBackground}
446
450
  />
447
451
 
448
452
  <ChangedYourMindDrawer
@@ -1,7 +1,7 @@
1
1
  import { useContext, useEffect } from 'react';
2
2
  import { Body, Box, Heading } from '@biom3/react';
3
3
  import { useTranslation } from 'react-i18next';
4
- import { ChainId } from '@imtbl/checkout-sdk';
4
+ import { ChainId, ThemeOverrides } from '@imtbl/checkout-sdk';
5
5
  import { FooterLogo } from '../../../components/Footer/FooterLogo';
6
6
  import { HeaderNavigation } from '../../../components/Header/HeaderNavigation';
7
7
  import { SimpleLayout } from '../../../components/SimpleLayout/SimpleLayout';
@@ -18,6 +18,7 @@ export interface ConnectWalletProps {
18
18
  checkNetwork: boolean;
19
19
  showBackButton?: boolean;
20
20
  onBackButtonClick?: () => void;
21
+ themeOverrides: ThemeOverrides;
21
22
  }
22
23
 
23
24
  export function ConnectWallet({
@@ -29,6 +30,7 @@ export function ConnectWallet({
29
30
  checkNetwork,
30
31
  showBackButton,
31
32
  onBackButtonClick,
33
+ themeOverrides,
32
34
  }: ConnectWalletProps) {
33
35
  const { t } = useTranslation();
34
36
  const {
@@ -91,6 +93,7 @@ export function ConnectWallet({
91
93
  allowlistWalletRdns={allowlistWalletRdns}
92
94
  blocklistWalletRdns={blocklistWalletRdns}
93
95
  isCheckNetworkEnabled={checkNetwork}
96
+ themeOverrides={themeOverrides}
94
97
  />
95
98
  </Box>
96
99
  </SimpleLayout>
@@ -191,6 +191,7 @@ export default function PurchaseWidget({
191
191
  checkout={checkout}
192
192
  environmentId={environmentId!}
193
193
  showBackButton={showBackButton}
194
+ themeOverrides={config.themeOverrides}
194
195
  onCloseButtonClick={() => sendPurchaseCloseEvent(eventTarget)}
195
196
  onBackButtonClick={() => {
196
197
  orchestrationEvents.sendRequestGoBackEvent(
@@ -37,6 +37,7 @@ type PurchaseConnectWalletDrawerProps = {
37
37
  rdns: string;
38
38
  }[];
39
39
  shouldIdentifyUser?: boolean;
40
+ drawerBackground: string | undefined;
40
41
  };
41
42
 
42
43
  export function PurchaseConnectWalletDrawer({
@@ -51,6 +52,7 @@ export function PurchaseConnectWalletDrawer({
51
52
  menuItemSize = 'small',
52
53
  disabledOptions = [],
53
54
  shouldIdentifyUser = true,
55
+ drawerBackground,
54
56
  }: PurchaseConnectWalletDrawerProps) {
55
57
  const {
56
58
  providersState: { checkout },
@@ -178,6 +180,7 @@ export function PurchaseConnectWalletDrawer({
178
180
  }}
179
181
  onWalletChange={handleOnWalletChangeEvent}
180
182
  bottomSlot={bottomSlot}
183
+ drawerBackground={drawerBackground}
181
184
  />
182
185
  <UnableToConnectDrawer
183
186
  visible={showUnableToConnectDrawer}
@@ -15,6 +15,7 @@ type PurchaseDeliverToWalletDrawerProps = {
15
15
  provider: BrowserProvider,
16
16
  providerInfo: EIP6963ProviderInfo
17
17
  ) => void;
18
+ drawerBackground: string | undefined;
18
19
  };
19
20
 
20
21
  export function PurchaseDeliverToWalletDrawer({
@@ -22,6 +23,7 @@ export function PurchaseDeliverToWalletDrawer({
22
23
  onClose,
23
24
  onConnect,
24
25
  walletOptions,
26
+ drawerBackground,
25
27
  }: PurchaseDeliverToWalletDrawerProps) {
26
28
  const handleOnConnect = (
27
29
  provider: BrowserProvider,
@@ -39,6 +41,7 @@ export function PurchaseDeliverToWalletDrawer({
39
41
  providerType="to"
40
42
  walletOptions={walletOptions}
41
43
  onConnect={handleOnConnect}
44
+ drawerBackground={drawerBackground}
42
45
  />
43
46
  );
44
47
  }
@@ -13,6 +13,7 @@ type PurchasePayWithWalletDrawerProps = {
13
13
  walletOptions: EIP6963ProviderDetail[];
14
14
  insufficientBalance?: boolean;
15
15
  showOnRampOption?: boolean;
16
+ drawerBackground: string | undefined;
16
17
  };
17
18
 
18
19
  export function PurchasePayWithWalletDrawer({
@@ -23,6 +24,7 @@ export function PurchasePayWithWalletDrawer({
23
24
  walletOptions,
24
25
  insufficientBalance,
25
26
  showOnRampOption = true,
27
+ drawerBackground,
26
28
  }: PurchasePayWithWalletDrawerProps) {
27
29
  const { t } = useTranslation();
28
30
  const { providersState: { fromProviderInfo } } = useProvidersContext();
@@ -79,6 +81,7 @@ export function PurchasePayWithWalletDrawer({
79
81
  bottomSlot={payWithCardItem}
80
82
  onConnect={handleOnConnect}
81
83
  shouldIdentifyUser={false}
84
+ drawerBackground={drawerBackground}
82
85
  />
83
86
  );
84
87
  }
@@ -5,6 +5,7 @@ import {
5
5
  import {
6
6
  Checkout, WalletProviderRdns, EIP6963ProviderInfo, ChainId,
7
7
  WrappedBrowserProvider,
8
+ ThemeOverrides,
8
9
  } from '@imtbl/checkout-sdk';
9
10
  import { Environment } from '@imtbl/config';
10
11
  import { t } from 'i18next';
@@ -59,6 +60,7 @@ interface PurchaseProps {
59
60
  showBackButton?: boolean;
60
61
  onCloseButtonClick?: () => void;
61
62
  onBackButtonClick?: () => void;
63
+ themeOverrides: ThemeOverrides;
62
64
  }
63
65
 
64
66
  export function Purchase({
@@ -67,6 +69,7 @@ export function Purchase({
67
69
  onCloseButtonClick,
68
70
  showBackButton,
69
71
  onBackButtonClick,
72
+ themeOverrides,
70
73
  }: PurchaseProps) {
71
74
  const [showPayWithWalletDrawer, setShowPayWithWalletDrawer] = useState(false);
72
75
  const [showDeliverToWalletDrawer, setShowDeliverToWalletDrawer] = useState(false);
@@ -686,12 +689,14 @@ export function Purchase({
686
689
  onConnect={handleWalletConnected}
687
690
  insufficientBalance={insufficientBalance}
688
691
  showOnRampOption={shouldShowOnRampOption}
692
+ drawerBackground={themeOverrides.drawerBackground}
689
693
  />
690
694
  <PurchaseDeliverToWalletDrawer
691
695
  visible={showDeliverToWalletDrawer}
692
696
  walletOptions={walletOptions}
693
697
  onClose={handleDeliverToWalletClose}
694
698
  onConnect={() => undefined}
699
+ drawerBackground={themeOverrides.drawerBackground}
695
700
  />
696
701
  <RouteOptionsDrawer
697
702
  checkout={checkout}
@@ -81,6 +81,7 @@ export default function SwapWidget({
81
81
 
82
82
  const {
83
83
  theme,
84
+ themeOverrides,
84
85
  isOnRampEnabled,
85
86
  isSwapEnabled,
86
87
  isBridgeEnabled,
@@ -254,6 +255,7 @@ export default function SwapWidget({
254
255
  {viewState.view.type === SwapWidgetViews.SWAP && (
255
256
  <SwapCoins
256
257
  theme={theme}
258
+ themeOverrides={themeOverrides}
257
259
  cancelAutoProceed={cancelAutoProceed}
258
260
  fromAmount={viewState.view.data?.fromAmount ?? fromAmount}
259
261
  toAmount={viewState.view.data?.toAmount ?? toAmount}
@@ -6,6 +6,7 @@ import {
6
6
  Box, ButtCon, Heading, Icon, OptionKey, Tooltip, Body,
7
7
  } from '@biom3/react';
8
8
  import {
9
+ ThemeOverrides,
9
10
  TokenInfo,
10
11
  WidgetTheme,
11
12
  } from '@imtbl/checkout-sdk';
@@ -77,6 +78,7 @@ let quoteRequest: CancellablePromise<any>;
77
78
  export interface SwapFromProps {
78
79
  data?: SwapFormData;
79
80
  theme: WidgetTheme;
81
+ themeOverrides: ThemeOverrides;
80
82
  cancelAutoProceed: () => void;
81
83
  subTitle: string;
82
84
  }
@@ -89,7 +91,7 @@ class PriceImpactError extends Error {
89
91
  }
90
92
 
91
93
  export function SwapForm({
92
- data, theme, cancelAutoProceed, subTitle,
94
+ data, theme, themeOverrides, cancelAutoProceed, subTitle,
93
95
  }: SwapFromProps) {
94
96
  const { t } = useTranslation();
95
97
  const {
@@ -1009,6 +1011,7 @@ export function SwapForm({
1009
1011
  screen="SwapCoins"
1010
1012
  environment={checkout?.config.environment}
1011
1013
  theme={theme}
1014
+ themeOverrides={themeOverrides}
1012
1015
  />
1013
1016
  </Box>
1014
1017
 
@@ -1087,6 +1090,7 @@ export function SwapForm({
1087
1090
  screen="SwapCoins"
1088
1091
  environment={checkout?.config.environment}
1089
1092
  theme={theme}
1093
+ themeOverrides={themeOverrides}
1090
1094
  />
1091
1095
  </Box>
1092
1096
  </Box>
@@ -4,7 +4,7 @@ import {
4
4
  useEffect,
5
5
  useState,
6
6
  } from 'react';
7
- import { IMTBLWidgetEvents, WidgetTheme } from '@imtbl/checkout-sdk';
7
+ import { IMTBLWidgetEvents, ThemeOverrides, WidgetTheme } from '@imtbl/checkout-sdk';
8
8
  import { useTranslation } from 'react-i18next';
9
9
  import { Environment } from '@imtbl/config';
10
10
  import { ConnectLoaderContext } from '../../../context/connect-loader-context/ConnectLoaderContext';
@@ -26,6 +26,7 @@ import { orchestrationEvents } from '../../../lib/orchestrationEvents';
26
26
 
27
27
  export interface SwapCoinsProps {
28
28
  theme: WidgetTheme;
29
+ themeOverrides: ThemeOverrides;
29
30
  cancelAutoProceed: () => void;
30
31
  fromAmount?: string;
31
32
  toAmount?: string;
@@ -39,6 +40,7 @@ export interface SwapCoinsProps {
39
40
 
40
41
  export function SwapCoins({
41
42
  theme,
43
+ themeOverrides,
42
44
  cancelAutoProceed,
43
45
  fromAmount,
44
46
  toAmount,
@@ -125,6 +127,7 @@ export function SwapCoins({
125
127
  toTokenAddress,
126
128
  }}
127
129
  theme={theme}
130
+ themeOverrides={themeOverrides}
128
131
  subTitle={subTitle}
129
132
  />
130
133
  <NotEnoughImx
@@ -189,6 +189,8 @@ export function TransferForm({
189
189
  userJourney={UserJourney.TRANSFER}
190
190
  screen="TransferToken"
191
191
  control="Token"
192
+ theme={config.theme}
193
+ themeOverrides={config.themeOverrides}
192
194
  />
193
195
  </Stack>
194
196
  <Stack gap="base.spacing.x1">