@imtbl/checkout-widgets 2.24.7 → 2.24.9-0
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.
- package/dist/browser/{AddTokensWidget-aAZMavtt.js → AddTokensWidget-CIR8BF_I.js} +24 -297
- package/dist/browser/{BridgeWidget-CWWCr015.js → BridgeWidget-C5Uljhhx.js} +13 -294
- package/dist/browser/{CommerceWidget-B36D9SAt.js → CommerceWidget-CeBBYCbK.js} +17 -47
- package/dist/browser/{FeesBreakdown-WeqZxAT6.js → FeesBreakdown-BU4haotD.js} +1 -1
- package/dist/browser/{OnRampWidget-DpxysET8.js → OnRampWidget-Ccvb3QkT.js} +5 -80
- package/dist/browser/{SaleWidget-CMkn5eAJ.js → SaleWidget-CPARFlzv.js} +61 -219
- package/dist/browser/{SpendingCapHero-BuWrv_Rb.js → SpendingCapHero-B-0YYZho.js} +1 -1
- package/dist/browser/{SwapWidget-CEnCMtGs.js → SwapWidget-ujE6uX-N.js} +12 -206
- package/dist/browser/{TokenImage-EqfdG328.js → TokenImage-BeUf_Ulv.js} +1 -1
- package/dist/browser/{TopUpView-D3BxE8R3.js → TopUpView-GMv3360Q.js} +3 -54
- package/dist/browser/{WalletApproveHero-C_8es7r9.js → WalletApproveHero-BJi7ufqM.js} +4 -12
- package/dist/browser/{WalletWidget-Czye7zS5.js → WalletWidget-BABrqsfd.js} +4 -96
- package/dist/browser/{index-WfurfROg.js → index-CcxHW36j.js} +1275 -9717
- package/dist/browser/{index-CcLq9am4.js → index-Cp1w6map.js} +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/{useInterval-CrmneADn.js → useInterval-DbCsm_gG.js} +1 -1
- package/dist/types/components/FormComponents/SelectForm/SelectForm.d.ts +1 -5
- package/dist/types/components/FormComponents/SelectInput/SelectInput.d.ts +1 -5
- package/dist/types/components/Transak/TransakIframe.d.ts +0 -1
- package/dist/types/components/Transak/useTransakEvents.d.ts +0 -4
- package/dist/types/components/WalletDrawer/ConnectWalletDrawer.d.ts +1 -2
- package/dist/types/lib/squid/hooks/useExecute.d.ts +1 -2
- package/dist/types/views/top-up/TopUpView.d.ts +1 -5
- package/dist/types/widgets/add-tokens/hooks/useError.d.ts +1 -1
- package/dist/types/widgets/purchase/components/PurchaseConnectWalletDrawer.d.ts +1 -3
- package/dist/types/widgets/sale/hooks/useSaleEvents.d.ts +5 -31
- package/dist/types/widgets/swap/components/Fees.d.ts +1 -1
- package/package.json +7 -9
- package/src/components/ConnectLoader/ConnectLoader.tsx +0 -16
- package/src/components/FormComponents/SelectForm/SelectForm.tsx +2 -18
- package/src/components/FormComponents/SelectInput/SelectInput.tsx +1 -12
- package/src/components/RouteOptionsDrawer/RouteOptionsDrawer.tsx +2 -26
- package/src/components/Transactions/ChangeWallet.tsx +1 -12
- package/src/components/Transactions/ClaimWithdrawalInProgress.tsx +0 -11
- package/src/components/Transactions/NoTransactions.tsx +0 -10
- package/src/components/Transactions/TransactionItemWithdrawPending.tsx +1 -13
- package/src/components/Transactions/Transactions.tsx +2 -28
- package/src/components/Transak/TransakIframe.tsx +0 -6
- package/src/components/Transak/useTransakEvents.ts +1 -70
- package/src/components/WalletDrawer/ConnectWalletDrawer.tsx +2 -35
- package/src/components/WalletDrawer/PayWithWalletDrawer.tsx +0 -1
- package/src/context/view-context/test-components/ViewContextTestComponent.tsx +14 -15
- package/src/lib/squid/hooks/useExecute.ts +5 -18
- package/src/views/top-up/TopUpView.tsx +5 -56
- package/src/widgets/add-tokens/AddTokensRoot.tsx +28 -29
- package/src/widgets/add-tokens/AddTokensWidget.tsx +2 -17
- package/src/widgets/add-tokens/components/TokenDrawerMenu.tsx +2 -18
- package/src/widgets/add-tokens/hooks/useError.tsx +1 -18
- package/src/widgets/add-tokens/hooks/useErrorHandler.ts +2 -12
- package/src/widgets/add-tokens/views/AddTokens.tsx +8 -154
- package/src/widgets/add-tokens/views/Review.tsx +6 -94
- package/src/widgets/bridge/BridgeWidget.tsx +0 -35
- package/src/widgets/bridge/BridgeWidgetRoot.tsx +17 -18
- package/src/widgets/bridge/components/BridgeForm.tsx +0 -20
- package/src/widgets/bridge/components/BridgeReviewSummary.tsx +1 -49
- package/src/widgets/bridge/components/WalletAndNetworkSelector.tsx +3 -122
- package/src/widgets/bridge/views/ApproveTransaction.tsx +1 -15
- package/src/widgets/bridge/views/Bridge.tsx +1 -16
- package/src/widgets/bridge/views/BridgeReview.tsx +1 -12
- package/src/widgets/bridge/views/ClaimWithdrawal.tsx +0 -11
- package/src/widgets/bridge/views/MoveInProgress.tsx +0 -24
- package/src/widgets/bridge/views/WalletNetworkSelectionView.tsx +1 -12
- package/src/widgets/connect/ConnectWidget.tsx +2 -18
- package/src/widgets/connect/ConnectWidgetRoot.tsx +15 -16
- package/src/widgets/connect/components/WalletList.tsx +6 -55
- package/src/widgets/connect/views/ConnectWallet.tsx +1 -12
- package/src/widgets/connect/views/ReadyToConnect.tsx +2 -29
- package/src/widgets/connect/views/SwitchNetworkEth.tsx +3 -22
- package/src/widgets/connect/views/SwitchNetworkZkEVM.tsx +0 -18
- package/src/widgets/immutable-commerce/CommerceWidgetRoot.tsx +17 -19
- package/src/widgets/on-ramp/OnRampWidget.tsx +0 -2
- package/src/widgets/on-ramp/OnRampWidgetRoot.tsx +23 -24
- package/src/widgets/on-ramp/views/OnRampMain.tsx +1 -91
- package/src/widgets/purchase/PurchaseWidgetRoot.tsx +22 -23
- package/src/widgets/purchase/components/PurchaseConnectWalletDrawer.tsx +2 -34
- package/src/widgets/purchase/components/PurchaseDeliverToWalletDrawer.tsx +0 -1
- package/src/widgets/purchase/components/PurchasePayWithWalletDrawer.tsx +0 -2
- package/src/widgets/purchase/components/PurchaseRouteOptionsDrawer/RouteOptionsDrawer.tsx +1 -30
- package/src/widgets/purchase/components/WithCard.tsx +0 -4
- package/src/widgets/purchase/views/Purchase.tsx +1 -2
- package/src/widgets/sale/SaleWidget.tsx +0 -2
- package/src/widgets/sale/SaleWidgetRoot.tsx +32 -33
- package/src/widgets/sale/components/OrderReview.tsx +2 -29
- package/src/widgets/sale/components/WithCard.tsx +0 -2
- package/src/widgets/sale/hooks/useSaleEvents.ts +3 -185
- package/src/widgets/sale/views/OrderSummary.tsx +2 -15
- package/src/widgets/sale/views/PayWithCard.tsx +4 -46
- package/src/widgets/sale/views/PayWithCoins.tsx +4 -9
- package/src/widgets/sale/views/PaymentMethods.tsx +3 -6
- package/src/widgets/sale/views/SaleErrorView.tsx +1 -1
- package/src/widgets/swap/SwapWidget.tsx +0 -24
- package/src/widgets/swap/SwapWidgetRoot.tsx +29 -30
- package/src/widgets/swap/components/Fees.tsx +1 -1
- package/src/widgets/swap/components/SwapForm.tsx +2 -140
- package/src/widgets/swap/views/ApproveERC20Onboarding.tsx +1 -36
- package/src/widgets/swap/views/SwapCoins.tsx +0 -17
- package/src/widgets/swap/views/SwapInProgress.tsx +0 -14
- package/src/widgets/transfer/TransferForm.tsx +3 -25
- package/src/widgets/transfer/TransferWidget.tsx +1 -23
- package/src/widgets/wallet/WalletWidgetRoot.tsx +24 -25
- package/src/widgets/wallet/components/BalanceItem/BalanceItem.tsx +1 -50
- package/src/widgets/wallet/components/NetworkMenu/NetworkMenu.tsx +0 -13
- package/src/widgets/wallet/components/WalletAddress/WalletAddress.tsx +0 -13
- package/src/widgets/wallet/views/CoinInfo.tsx +1 -12
- package/src/widgets/wallet/views/Settings.tsx +1 -15
- package/src/widgets/wallet/views/WalletBalances.tsx +0 -24
- package/tsconfig.json +0 -1
- package/dist/browser/auto-track-BcwQjFJ1.js +0 -105
- package/dist/browser/index-BSnE_6oQ.js +0 -27
- package/dist/browser/index-CKGatDzP.js +0 -60
- package/dist/browser/index-Cnt0i-EY.js +0 -65
- package/dist/browser/index-DLXeqRzN.js +0 -65
- package/dist/browser/index-MANbU_qG.js +0 -5634
- package/dist/browser/index-lHICKwNF.js +0 -446
- package/dist/browser/index.umd-Cn1Q502t.js +0 -32
- package/dist/browser/is-plan-event-enabled-mXX0dwl-.js +0 -17
- package/dist/types/context/analytics-provider/CustomAnalyticsProvider.d.ts +0 -7
- package/dist/types/context/analytics-provider/SegmentAnalyticsProvider.d.ts +0 -42
- package/dist/types/context/analytics-provider/SetupAnalytics.d.ts +0 -7
- package/dist/types/lib/analytics/identifyUser.d.ts +0 -8
- package/dist/types/lib/analytics/identifyUser.test.d.ts +0 -1
- package/src/context/analytics-provider/CustomAnalyticsProvider.tsx +0 -22
- package/src/context/analytics-provider/SegmentAnalyticsProvider.ts +0 -41
- package/src/context/analytics-provider/SetupAnalytics.tsx +0 -35
- package/src/lib/analytics/identifyUser.test.ts +0 -44
- package/src/lib/analytics/identifyUser.ts +0 -26
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { dQ as se$1, dR as T$2, dS as oe$1, dT as R$1, dU as a$2, dV as te$1, dW as p$1, dX as ne$1, dY as y$1 } from './index-CcxHW36j.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @license
|
package/dist/browser/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { dZ as WidgetsFactory } from './index-CcxHW36j.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as reactExports,
|
|
1
|
+
import { r as reactExports, dP as useBrowserLayoutEffect } from './index-CcxHW36j.js';
|
|
2
2
|
|
|
3
3
|
// Inspired by https://usehooks-ts.com/react-hook/use-interval
|
|
4
4
|
function useInterval(callback, delay) {
|
|
@@ -2,7 +2,6 @@ import { OptionKey } from '@biom3/react';
|
|
|
2
2
|
import { Environment } from '@imtbl/config';
|
|
3
3
|
import { ThemeOverrides, WidgetTheme } from '@imtbl/checkout-sdk';
|
|
4
4
|
import { CoinSelectorOptionProps } from '../../CoinSelector/CoinSelectorOption';
|
|
5
|
-
import { UserJourney } from '../../../context/analytics-provider/SegmentAnalyticsProvider';
|
|
6
5
|
interface SelectFormProps {
|
|
7
6
|
testId: string;
|
|
8
7
|
options: CoinSelectorOptionProps[];
|
|
@@ -15,12 +14,9 @@ interface SelectFormProps {
|
|
|
15
14
|
onSelectChange: (value: string) => void;
|
|
16
15
|
coinSelectorHeading: string;
|
|
17
16
|
defaultTokenImage: string;
|
|
18
|
-
userJourney: UserJourney;
|
|
19
|
-
screen: string;
|
|
20
|
-
control: string;
|
|
21
17
|
environment?: Environment;
|
|
22
18
|
theme: WidgetTheme;
|
|
23
19
|
themeOverrides: ThemeOverrides;
|
|
24
20
|
}
|
|
25
|
-
export declare function SelectForm({ testId, options, optionsLoading, subtext, onSelectChange, textAlign, errorMessage, disabled, selectedOption, coinSelectorHeading, defaultTokenImage,
|
|
21
|
+
export declare function SelectForm({ testId, options, optionsLoading, subtext, onSelectChange, textAlign, errorMessage, disabled, selectedOption, coinSelectorHeading, defaultTokenImage, environment, theme, themeOverrides, }: SelectFormProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
26
22
|
export {};
|
|
@@ -3,7 +3,6 @@ import { ThemeOverrides, WidgetTheme } from '@imtbl/checkout-sdk';
|
|
|
3
3
|
import { Environment } from '@imtbl/config';
|
|
4
4
|
import { InputMode, TextInputType } from '../TextInputForm/TextInputForm';
|
|
5
5
|
import { CoinSelectorOptionProps } from '../../CoinSelector/CoinSelectorOption';
|
|
6
|
-
import { UserJourney } from '../../../context/analytics-provider/SegmentAnalyticsProvider';
|
|
7
6
|
interface SelectInputProps {
|
|
8
7
|
testId: string;
|
|
9
8
|
options: CoinSelectorOptionProps[];
|
|
@@ -28,12 +27,9 @@ interface SelectInputProps {
|
|
|
28
27
|
onSelectChange: (value: OptionKey) => void;
|
|
29
28
|
selectedOption?: OptionKey;
|
|
30
29
|
defaultTokenImage: string;
|
|
31
|
-
userJourney: UserJourney;
|
|
32
|
-
screen: string;
|
|
33
|
-
control: string;
|
|
34
30
|
environment?: Environment;
|
|
35
31
|
theme: WidgetTheme;
|
|
36
32
|
themeOverrides: ThemeOverrides;
|
|
37
33
|
}
|
|
38
|
-
export declare function SelectInput({ testId, options, textInputValue, textInputPlaceholder, textInputValidator, textInputType, onTextInputChange, onTextInputBlur, onTextInputFocus, textInputTextAlign, textInputSubtext, textInputErrorMessage, testInputMode, selectTextAlign, selectSubtext, selectErrorMessage, textInputMaxButtonClick, onSelectChange, textInputDisabled, selectInputDisabled, selectedOption, coinSelectorHeading, defaultTokenImage,
|
|
34
|
+
export declare function SelectInput({ testId, options, textInputValue, textInputPlaceholder, textInputValidator, textInputType, onTextInputChange, onTextInputBlur, onTextInputFocus, textInputTextAlign, textInputSubtext, textInputErrorMessage, testInputMode, selectTextAlign, selectSubtext, selectErrorMessage, textInputMaxButtonClick, onSelectChange, textInputDisabled, selectInputDisabled, selectedOption, coinSelectorHeading, defaultTokenImage, environment, theme, themeOverrides, }: SelectInputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
39
35
|
export {};
|
|
@@ -8,6 +8,5 @@ export type TransakIframeProps = {
|
|
|
8
8
|
contractId: string;
|
|
9
9
|
environment: Environment;
|
|
10
10
|
walletAddress: string;
|
|
11
|
-
isPassportWallet: boolean;
|
|
12
11
|
} & TransakEventHandlers & TransakNFTCheckoutParams;
|
|
13
12
|
export declare function TransakIframe(props: TransakIframeProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
import { UserJourney } from '../../context/analytics-provider/SegmentAnalyticsProvider';
|
|
3
2
|
export declare const TRANSAK_ORIGIN: string[];
|
|
4
3
|
export type TransakEventHandlers = {
|
|
5
4
|
onInit?: (data: Record<string, unknown>) => void;
|
|
@@ -12,10 +11,7 @@ export type TransakEventHandlers = {
|
|
|
12
11
|
failedToLoadTimeoutInMs?: number;
|
|
13
12
|
};
|
|
14
13
|
type UseTransakEventsProps = {
|
|
15
|
-
userJourney: UserJourney;
|
|
16
14
|
ref: RefObject<HTMLIFrameElement> | undefined;
|
|
17
|
-
walletAddress: string;
|
|
18
|
-
isPassportWallet: boolean;
|
|
19
15
|
} & TransakEventHandlers;
|
|
20
16
|
export declare const useTransakEvents: (props: UseTransakEventsProps) => {
|
|
21
17
|
initialised: boolean;
|
|
@@ -17,8 +17,7 @@ type ConnectWalletDrawerProps = {
|
|
|
17
17
|
rdns: string;
|
|
18
18
|
}[];
|
|
19
19
|
getShouldRequestWalletPermissions?: (providerInfo: EIP6963ProviderInfo) => boolean | undefined;
|
|
20
|
-
shouldIdentifyUser?: boolean;
|
|
21
20
|
drawerBackground: string | undefined;
|
|
22
21
|
};
|
|
23
|
-
export declare function ConnectWalletDrawer({ heading, visible, onClose, onConnect, onError, providerType, walletOptions, bottomSlot, menuItemSize, disabledOptions, getShouldRequestWalletPermissions,
|
|
22
|
+
export declare function ConnectWalletDrawer({ heading, visible, onClose, onConnect, onError, providerType, walletOptions, bottomSlot, menuItemSize, disabledOptions, getShouldRequestWalletPermissions, drawerBackground, }: ConnectWalletDrawerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
24
23
|
export {};
|
|
@@ -3,8 +3,7 @@ import { Squid } from '@0xsquid/sdk';
|
|
|
3
3
|
import { TransactionReceipt } from 'ethers';
|
|
4
4
|
import { StatusResponse } from '@0xsquid/sdk/dist/types';
|
|
5
5
|
import { EIP6963ProviderInfo, WrappedBrowserProvider } from '@imtbl/checkout-sdk';
|
|
6
|
-
|
|
7
|
-
export declare const useExecute: (userJourney: UserJourney, onTransactionError?: (err: unknown) => void) => {
|
|
6
|
+
export declare const useExecute: (flowPrefix: 'AddTokens' | 'Purchase', onTransactionError?: (err: unknown) => void) => {
|
|
8
7
|
getAllowance: (provider: WrappedBrowserProvider, routeResponse: RouteResponse) => Promise<bigint | undefined>;
|
|
9
8
|
approve: (fromProviderInfo: EIP6963ProviderInfo, provider: WrappedBrowserProvider, routeResponse: RouteResponse) => Promise<TransactionReceipt | undefined>;
|
|
10
9
|
execute: (squid: Squid, fromProviderInfo: EIP6963ProviderInfo, provider: WrappedBrowserProvider, routeResponse: RouteResponse) => Promise<TransactionReceipt | undefined>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Checkout, IMTBLWidgetEvents, WrappedBrowserProvider } from '@imtbl/checkout-sdk';
|
|
2
|
-
import { UserJourney } from '../../context/analytics-provider/SegmentAnalyticsProvider';
|
|
3
2
|
type $Dictionary<T = unknown> = {
|
|
4
3
|
[key: string]: T;
|
|
5
4
|
};
|
|
@@ -12,9 +11,6 @@ interface TopUpViewProps {
|
|
|
12
11
|
showBridgeOption: boolean;
|
|
13
12
|
tokenAddress?: string;
|
|
14
13
|
amount?: string;
|
|
15
|
-
analytics: {
|
|
16
|
-
userJourney: UserJourney;
|
|
17
|
-
};
|
|
18
14
|
onCloseButtonClick: () => void;
|
|
19
15
|
onBackButtonClick?: () => void;
|
|
20
16
|
heading?: [key: string, options?: $Dictionary];
|
|
@@ -25,5 +21,5 @@ export declare const TOOLKIT_BASE_URL: {
|
|
|
25
21
|
production: string;
|
|
26
22
|
};
|
|
27
23
|
export declare function TopUpView({ widgetEvent, checkout, provider, // Keep this for future use
|
|
28
|
-
showOnrampOption, showSwapOption, showBridgeOption, tokenAddress, amount,
|
|
24
|
+
showOnrampOption, showSwapOption, showBridgeOption, tokenAddress, amount, onCloseButtonClick, onBackButtonClick, heading, subheading, }: TopUpViewProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
29
25
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Environment } from '@imtbl/config';
|
|
2
2
|
import { AddTokensErrorTypes } from '../types';
|
|
3
3
|
export declare const useError: (environment: Environment) => {
|
|
4
|
-
showErrorHandover: (errorType: AddTokensErrorTypes
|
|
4
|
+
showErrorHandover: (errorType: AddTokensErrorTypes) => void;
|
|
5
5
|
};
|
|
@@ -8,7 +8,6 @@ type PurchaseConnectWalletDrawerProps = {
|
|
|
8
8
|
onClose: (address?: string) => void;
|
|
9
9
|
onConnect?: (provider: WrappedBrowserProvider, providerInfo: EIP6963ProviderInfo) => void;
|
|
10
10
|
onError?: (errorType: ConnectEIP6963ProviderError) => void;
|
|
11
|
-
providerType: 'from' | 'to';
|
|
12
11
|
walletOptions: EIP6963ProviderDetail[];
|
|
13
12
|
bottomSlot?: ReactNode;
|
|
14
13
|
menuItemSize?: MenuItemProps['size'];
|
|
@@ -16,8 +15,7 @@ type PurchaseConnectWalletDrawerProps = {
|
|
|
16
15
|
label: string;
|
|
17
16
|
rdns: string;
|
|
18
17
|
}[];
|
|
19
|
-
shouldIdentifyUser?: boolean;
|
|
20
18
|
drawerBackground: string | undefined;
|
|
21
19
|
};
|
|
22
|
-
export declare function PurchaseConnectWalletDrawer({ heading, visible, onClose, onConnect, onError,
|
|
20
|
+
export declare function PurchaseConnectWalletDrawer({ heading, visible, onClose, onConnect, onError, walletOptions, bottomSlot, menuItemSize, disabledOptions, drawerBackground, }: PurchaseConnectWalletDrawerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
23
21
|
export {};
|
|
@@ -1,36 +1,10 @@
|
|
|
1
|
-
import { StandardAnalyticsActions } from '@imtbl/react-analytics';
|
|
2
1
|
import { SalePaymentTypes } from '@imtbl/checkout-sdk';
|
|
3
|
-
import { UserJourney, AnalyticsControlTypes } from '../../../context/analytics-provider/SegmentAnalyticsProvider';
|
|
4
2
|
import { ExecutedTransaction, FundingBalance } from '../types';
|
|
5
3
|
export declare const useSaleEvent: () => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
extras?: Record<string, unknown> | undefined;
|
|
10
|
-
} & ({
|
|
11
|
-
action: StandardAnalyticsActions;
|
|
12
|
-
control?: undefined;
|
|
13
|
-
controlType?: undefined;
|
|
14
|
-
} | {
|
|
15
|
-
control: string;
|
|
16
|
-
controlType: AnalyticsControlTypes;
|
|
17
|
-
action?: StandardAnalyticsActions | undefined;
|
|
18
|
-
})) => Promise<import("@segment/analytics-next").Context>;
|
|
19
|
-
page: (props: {
|
|
20
|
-
screen: string;
|
|
21
|
-
userJourney: UserJourney;
|
|
22
|
-
action?: StandardAnalyticsActions | undefined;
|
|
23
|
-
extras?: Record<string, unknown> | undefined;
|
|
24
|
-
}) => Promise<import("@segment/analytics-next").Context>;
|
|
25
|
-
sendPageView: (screen: string, data?: Record<string, unknown>) => void;
|
|
26
|
-
sendCloseEvent: (screen?: string, controlType?: AnalyticsControlTypes, action?: StandardAnalyticsActions) => void;
|
|
27
|
-
sendSuccessEvent: (screen?: string, transactions?: ExecutedTransaction[], tokenIds?: string[], details?: Record<string, any>) => void;
|
|
28
|
-
sendFailedEvent: (reason: string, error: Record<string, unknown>, transactions?: ExecutedTransaction[], screen?: string, details?: Record<string, any>) => void;
|
|
4
|
+
sendCloseEvent: () => void;
|
|
5
|
+
sendSuccessEvent: (transactions?: ExecutedTransaction[], tokenIds?: string[], details?: Record<string, any>) => void;
|
|
6
|
+
sendFailedEvent: (reason: string, error: Record<string, unknown>, transactions?: ExecutedTransaction[], details?: Record<string, any>) => void;
|
|
29
7
|
sendTransactionSuccessEvent: (transaction: ExecutedTransaction) => void;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
sendSelectedPaymentToken: (screen: string, fundingBalance: FundingBalance, conversions: Map<string, number>) => void;
|
|
33
|
-
sendProceedToPay: (screen: string, fundingBalance: FundingBalance, conversions: Map<string, number>, controlType?: AnalyticsControlTypes, action?: StandardAnalyticsActions) => void;
|
|
34
|
-
sendViewFeesEvent: (screen: string, controlType?: AnalyticsControlTypes, action?: StandardAnalyticsActions) => void;
|
|
35
|
-
sendInsufficientFunds: (screen: string, txRequirements: any, controlType?: AnalyticsControlTypes, action?: StandardAnalyticsActions) => void;
|
|
8
|
+
sendSelectedPaymentMethod: (type: SalePaymentTypes) => void;
|
|
9
|
+
sendSelectedPaymentToken: (fundingBalance: FundingBalance, conversions: Map<string, number>) => void;
|
|
36
10
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imtbl/checkout-widgets",
|
|
3
|
-
"version": "2.24.
|
|
3
|
+
"version": "2.24.9-0",
|
|
4
4
|
"browserslist": {
|
|
5
5
|
"production": [
|
|
6
6
|
">0.2%",
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
"@biom3/design-tokens": "^0.4.5",
|
|
19
19
|
"@biom3/react": "^0.29.4",
|
|
20
20
|
"@emotion/react": "^11.11.3",
|
|
21
|
-
"@imtbl/react-analytics": "0.3.4-alpha",
|
|
22
21
|
"@rive-app/react-canvas-lite": "^4.9.0",
|
|
23
22
|
"@walletconnect/ethereum-provider": "^2.11.1",
|
|
24
23
|
"@walletconnect/modal": "^2.6.2",
|
|
@@ -36,12 +35,12 @@
|
|
|
36
35
|
"react-i18next": "^13.5.0",
|
|
37
36
|
"ts-deepmerge": "^7.0.2",
|
|
38
37
|
"uuid": "^9.0.1",
|
|
39
|
-
"@imtbl/
|
|
40
|
-
"@imtbl/
|
|
41
|
-
"@imtbl/config": "2.24.
|
|
42
|
-
"@imtbl/cryptofiat": "2.24.
|
|
43
|
-
"@imtbl/dex-sdk": "2.24.
|
|
44
|
-
"@imtbl/passport": "2.24.
|
|
38
|
+
"@imtbl/checkout-sdk": "2.24.9-0",
|
|
39
|
+
"@imtbl/bridge-sdk": "2.24.9-0",
|
|
40
|
+
"@imtbl/config": "2.24.9-0",
|
|
41
|
+
"@imtbl/cryptofiat": "2.24.9-0",
|
|
42
|
+
"@imtbl/dex-sdk": "2.24.9-0",
|
|
43
|
+
"@imtbl/passport": "2.24.9-0"
|
|
45
44
|
},
|
|
46
45
|
"devDependencies": {
|
|
47
46
|
"@0xsquid/squid-types": "^0.1.108",
|
|
@@ -51,7 +50,6 @@
|
|
|
51
50
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
52
51
|
"@rollup/plugin-replace": "^6.0.3",
|
|
53
52
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
54
|
-
"@segment/analytics-next": "^1.53.2",
|
|
55
53
|
"@swc/core": "^1.15.46",
|
|
56
54
|
"@swc/jest": "^0.2.37",
|
|
57
55
|
"@testing-library/jest-dom": "^5.16.5",
|
|
@@ -22,8 +22,6 @@ import { LoadingView } from '../../views/loading/LoadingView';
|
|
|
22
22
|
import ConnectWidget from '../../widgets/connect/ConnectWidget';
|
|
23
23
|
import { ConnectWidgetViews } from '../../context/view-context/ConnectViewContextTypes';
|
|
24
24
|
import { StrongCheckoutWidgetsConfig } from '../../lib/withDefaultWidgetConfig';
|
|
25
|
-
import { useAnalytics } from '../../context/analytics-provider/SegmentAnalyticsProvider';
|
|
26
|
-
import { identifyUser } from '../../lib/analytics/identifyUser';
|
|
27
25
|
|
|
28
26
|
export interface ConnectLoaderProps {
|
|
29
27
|
children?: React.ReactNode;
|
|
@@ -77,9 +75,6 @@ export function ConnectLoader({
|
|
|
77
75
|
const {
|
|
78
76
|
connectionStatus, deepLink, provider,
|
|
79
77
|
} = connectLoaderState;
|
|
80
|
-
|
|
81
|
-
const { identify, user } = useAnalytics();
|
|
82
|
-
|
|
83
78
|
const hasNoWalletProviderNameAndNoBrowserProvider = (localProvider?: WrappedBrowserProvider): boolean => {
|
|
84
79
|
if (!walletProviderName && !localProvider) {
|
|
85
80
|
connectLoaderDispatch({
|
|
@@ -211,17 +206,6 @@ export function ConnectLoader({
|
|
|
211
206
|
} catch (err) {
|
|
212
207
|
return;
|
|
213
208
|
}
|
|
214
|
-
|
|
215
|
-
try {
|
|
216
|
-
// WT-1698 Analytics - Identify user here then progress to widget
|
|
217
|
-
// TODO: Identify user should be separated out into a use Effect with only the provider (from connect loader state) as dependency
|
|
218
|
-
const userData = user ? await user() : undefined;
|
|
219
|
-
const anonymousId = userData?.anonymousId();
|
|
220
|
-
await identifyUser(identify, browserProvider!, { anonymousId });
|
|
221
|
-
} catch (err) {
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
209
|
// The user is connected and the widget will be shown
|
|
226
210
|
connectLoaderDispatch({
|
|
227
211
|
payload: {
|
|
@@ -8,7 +8,6 @@ import { TokenImage } from '../../TokenImage/TokenImage';
|
|
|
8
8
|
import { FormControlWrapper } from '../FormControlWrapper/FormControlWrapper';
|
|
9
9
|
import { CoinSelector } from '../../CoinSelector/CoinSelector';
|
|
10
10
|
import { CoinSelectorOptionProps } from '../../CoinSelector/CoinSelectorOption';
|
|
11
|
-
import { useAnalytics, UserJourney } from '../../../context/analytics-provider/SegmentAnalyticsProvider';
|
|
12
11
|
|
|
13
12
|
interface SelectFormProps {
|
|
14
13
|
testId: string;
|
|
@@ -21,11 +20,7 @@ interface SelectFormProps {
|
|
|
21
20
|
disabled?: boolean;
|
|
22
21
|
onSelectChange: (value: string) => void;
|
|
23
22
|
coinSelectorHeading: string;
|
|
24
|
-
defaultTokenImage: string;
|
|
25
|
-
userJourney: UserJourney;
|
|
26
|
-
screen: string;
|
|
27
|
-
control: string;
|
|
28
|
-
environment?: Environment;
|
|
23
|
+
defaultTokenImage: string;environment?: Environment;
|
|
29
24
|
theme: WidgetTheme,
|
|
30
25
|
themeOverrides: ThemeOverrides,
|
|
31
26
|
}
|
|
@@ -42,14 +37,10 @@ export function SelectForm({
|
|
|
42
37
|
selectedOption,
|
|
43
38
|
coinSelectorHeading,
|
|
44
39
|
defaultTokenImage,
|
|
45
|
-
userJourney,
|
|
46
|
-
screen,
|
|
47
|
-
control,
|
|
48
40
|
environment = Environment.PRODUCTION,
|
|
49
41
|
theme,
|
|
50
42
|
themeOverrides,
|
|
51
43
|
}: SelectFormProps) {
|
|
52
|
-
const { track } = useAnalytics();
|
|
53
44
|
const [coinSelectorOpen, setCoinSelectorOpen] = useState<boolean>(false);
|
|
54
45
|
const coinSelectorOptions = useMemo(() => options.map((option) => ({
|
|
55
46
|
...option,
|
|
@@ -71,14 +62,7 @@ export function SelectForm({
|
|
|
71
62
|
|
|
72
63
|
const openCoinSelector = useCallback(() => {
|
|
73
64
|
setCoinSelectorOpen(true);
|
|
74
|
-
|
|
75
|
-
userJourney,
|
|
76
|
-
screen,
|
|
77
|
-
control,
|
|
78
|
-
controlType: 'Select',
|
|
79
|
-
action: 'Opened',
|
|
80
|
-
});
|
|
81
|
-
}, [setCoinSelectorOpen, track]);
|
|
65
|
+
}, [setCoinSelectorOpen]);
|
|
82
66
|
|
|
83
67
|
return (
|
|
84
68
|
<Box>
|
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
import { SelectForm } from '../SelectForm/SelectForm';
|
|
10
10
|
import { InputMode, TextInputForm, TextInputType } from '../TextInputForm/TextInputForm';
|
|
11
11
|
import { CoinSelectorOptionProps } from '../../CoinSelector/CoinSelectorOption';
|
|
12
|
-
import { UserJourney } from '../../../context/analytics-provider/SegmentAnalyticsProvider';
|
|
13
12
|
|
|
14
13
|
interface SelectInputProps {
|
|
15
14
|
testId: string;
|
|
@@ -34,11 +33,7 @@ interface SelectInputProps {
|
|
|
34
33
|
textInputMaxButtonClick?: () => void;
|
|
35
34
|
onSelectChange: (value: OptionKey) => void;
|
|
36
35
|
selectedOption?: OptionKey;
|
|
37
|
-
defaultTokenImage: string;
|
|
38
|
-
userJourney: UserJourney;
|
|
39
|
-
screen: string;
|
|
40
|
-
control: string;
|
|
41
|
-
environment?: Environment;
|
|
36
|
+
defaultTokenImage: string;environment?: Environment;
|
|
42
37
|
theme: WidgetTheme;
|
|
43
38
|
themeOverrides: ThemeOverrides;
|
|
44
39
|
}
|
|
@@ -67,9 +62,6 @@ export function SelectInput({
|
|
|
67
62
|
selectedOption,
|
|
68
63
|
coinSelectorHeading,
|
|
69
64
|
defaultTokenImage,
|
|
70
|
-
userJourney,
|
|
71
|
-
screen,
|
|
72
|
-
control,
|
|
73
65
|
environment,
|
|
74
66
|
theme,
|
|
75
67
|
themeOverrides,
|
|
@@ -88,9 +80,6 @@ export function SelectInput({
|
|
|
88
80
|
selectedOption={selectedOption}
|
|
89
81
|
coinSelectorHeading={coinSelectorHeading}
|
|
90
82
|
defaultTokenImage={defaultTokenImage}
|
|
91
|
-
control={control}
|
|
92
|
-
userJourney={userJourney}
|
|
93
|
-
screen={screen}
|
|
94
83
|
environment={environment}
|
|
95
84
|
theme={theme}
|
|
96
85
|
themeOverrides={themeOverrides}
|
|
@@ -2,11 +2,10 @@ import {
|
|
|
2
2
|
Drawer, EllipsizedText, MenuItem,
|
|
3
3
|
} from '@biom3/react';
|
|
4
4
|
import { motion } from 'framer-motion';
|
|
5
|
-
import { useContext,
|
|
5
|
+
import { useContext, useRef } from 'react';
|
|
6
6
|
|
|
7
7
|
import { Checkout } from '@imtbl/checkout-sdk';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
|
-
import { useAnalytics, UserJourney } from '../../context/analytics-provider/SegmentAnalyticsProvider';
|
|
10
9
|
import { useProvidersContext } from '../../context/providers-context/ProvidersContext';
|
|
11
10
|
import { listVariants } from '../../lib/animation/listAnimation';
|
|
12
11
|
import { RouteData } from '../../lib/squid/types';
|
|
@@ -42,10 +41,8 @@ export function RouteOptionsDrawer({
|
|
|
42
41
|
insufficientBalance,
|
|
43
42
|
}: OptionsDrawerProps) {
|
|
44
43
|
const { t } = useTranslation();
|
|
45
|
-
const { track } = useAnalytics();
|
|
46
|
-
|
|
47
44
|
const {
|
|
48
|
-
addTokensState: {
|
|
45
|
+
addTokensState: { chains },
|
|
49
46
|
} = useContext(AddTokensContext);
|
|
50
47
|
|
|
51
48
|
const {
|
|
@@ -59,27 +56,6 @@ export function RouteOptionsDrawer({
|
|
|
59
56
|
onRouteClick(route);
|
|
60
57
|
};
|
|
61
58
|
|
|
62
|
-
useEffect(() => {
|
|
63
|
-
if (!visible) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
track({
|
|
68
|
-
userJourney: UserJourney.ADD_TOKENS,
|
|
69
|
-
screen: 'InputScreen',
|
|
70
|
-
control: 'RoutesMenu',
|
|
71
|
-
controlType: 'MenuItem',
|
|
72
|
-
action: 'Opened',
|
|
73
|
-
extras: {
|
|
74
|
-
contextId: id,
|
|
75
|
-
showOnrampOption: Boolean(showOnrampOption),
|
|
76
|
-
showSwapOption: Boolean(showSwapOption),
|
|
77
|
-
insufficientBalance: Boolean(insufficientBalance),
|
|
78
|
-
routesAvailable: routes?.length ?? 0,
|
|
79
|
-
},
|
|
80
|
-
});
|
|
81
|
-
}, [visible]);
|
|
82
|
-
|
|
83
59
|
return (
|
|
84
60
|
<Drawer
|
|
85
61
|
size="full"
|
|
@@ -5,11 +5,7 @@ import { useContext, useEffect, useState } from 'react';
|
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { BridgeContext } from '../../widgets/bridge/context/BridgeContext';
|
|
7
7
|
import { isWalletConnectProvider } from '../../lib/provider';
|
|
8
|
-
import {
|
|
9
|
-
UserJourney,
|
|
10
|
-
useAnalytics,
|
|
11
|
-
} from '../../context/analytics-provider/SegmentAnalyticsProvider';
|
|
12
|
-
import { BridgeWidgetViews } from '../../context/view-context/BridgeViewContextTypes';
|
|
8
|
+
import { } from '../../context/view-context/BridgeViewContextTypes';
|
|
13
9
|
import { useWalletConnect } from '../../lib/hooks/useWalletConnect';
|
|
14
10
|
import {
|
|
15
11
|
headingStyles, rawImageStyle, wcStickerLogoStyles, wcWalletLogoStyles, wcWalletLogoWrapperStyles,
|
|
@@ -30,17 +26,10 @@ export function ChangeWallet({ onChangeWalletClick }: ChangeWalletProps) {
|
|
|
30
26
|
);
|
|
31
27
|
const [isWalletConnect, setIsWalletConnect] = useState<boolean>(false);
|
|
32
28
|
const { isWalletConnectEnabled, getWalletLogoUrl } = useWalletConnect();
|
|
33
|
-
const { track } = useAnalytics();
|
|
34
29
|
const walletAddress = from?.walletAddress || '';
|
|
35
30
|
const walletProviderInfo = from?.walletProviderInfo;
|
|
36
31
|
|
|
37
32
|
const handleChangeWalletClick = () => {
|
|
38
|
-
track({
|
|
39
|
-
userJourney: UserJourney.BRIDGE,
|
|
40
|
-
screen: BridgeWidgetViews.TRANSACTIONS,
|
|
41
|
-
controlType: 'Button',
|
|
42
|
-
control: 'Pressed',
|
|
43
|
-
});
|
|
44
33
|
onChangeWalletClick();
|
|
45
34
|
};
|
|
46
35
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useContext, useEffect } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import { TransactionResponse } from 'ethers';
|
|
4
|
-
import { UserJourney, useAnalytics } from '../../context/analytics-provider/SegmentAnalyticsProvider';
|
|
5
4
|
import { ViewActions, ViewContext } from '../../context/view-context/ViewContext';
|
|
6
5
|
import { BridgeWidgetViews } from '../../context/view-context/BridgeViewContextTypes';
|
|
7
6
|
import { LoadingView } from '../../views/loading/LoadingView';
|
|
@@ -13,16 +12,6 @@ interface ClaimWithdrawalInProgressProps {
|
|
|
13
12
|
export function ClaimWithdrawalInProgress({ transactionResponse }: ClaimWithdrawalInProgressProps) {
|
|
14
13
|
const { t } = useTranslation();
|
|
15
14
|
const { viewDispatch } = useContext(ViewContext);
|
|
16
|
-
|
|
17
|
-
const { page } = useAnalytics();
|
|
18
|
-
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
page({
|
|
21
|
-
userJourney: UserJourney.BRIDGE,
|
|
22
|
-
screen: 'ClaimWithdrawalInProgress',
|
|
23
|
-
});
|
|
24
|
-
}, []);
|
|
25
|
-
|
|
26
15
|
useEffect(() => {
|
|
27
16
|
if (!transactionResponse) return;
|
|
28
17
|
|
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
import { Checkout } from '@imtbl/checkout-sdk';
|
|
5
5
|
import { useState, useEffect } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
|
-
import { UserJourney, useAnalytics } from '../../context/analytics-provider/SegmentAnalyticsProvider';
|
|
8
7
|
import { PASSPORT_URL } from '../../lib';
|
|
9
8
|
import {
|
|
10
9
|
noTransactionsBodyStyle, noTransactionsContainerStyle, passportBodyStyle, containerStyles,
|
|
@@ -24,7 +23,6 @@ export function NoTransactions(
|
|
|
24
23
|
changeWallet,
|
|
25
24
|
}: NoTransactionsProps,
|
|
26
25
|
) {
|
|
27
|
-
const { page } = useAnalytics();
|
|
28
26
|
const { t } = useTranslation();
|
|
29
27
|
const [passportLink, setPassportLink] = useState('');
|
|
30
28
|
|
|
@@ -32,14 +30,6 @@ export function NoTransactions(
|
|
|
32
30
|
if (!checkout) return;
|
|
33
31
|
setPassportLink(PASSPORT_URL[checkout.config.environment]);
|
|
34
32
|
}, [checkout]);
|
|
35
|
-
|
|
36
|
-
useEffect(() => {
|
|
37
|
-
page({
|
|
38
|
-
userJourney: UserJourney.BRIDGE,
|
|
39
|
-
screen: 'NoTransactions',
|
|
40
|
-
});
|
|
41
|
-
}, []);
|
|
42
|
-
|
|
43
33
|
return (
|
|
44
34
|
<Box sx={containerStyles}>
|
|
45
35
|
<ChangeWallet onChangeWalletClick={changeWallet} />
|
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
import { useContext, useMemo } from 'react';
|
|
11
11
|
import { useTranslation } from 'react-i18next';
|
|
12
12
|
import { Environment } from '@imtbl/config';
|
|
13
|
-
import { UserJourney, useAnalytics } from '../../context/analytics-provider/SegmentAnalyticsProvider';
|
|
14
13
|
import { Transaction, TransactionStatus } from '../../lib/clients/checkoutApiType';
|
|
15
14
|
import { BridgeWidgetViews } from '../../context/view-context/BridgeViewContextTypes';
|
|
16
15
|
import { ViewActions, ViewContext } from '../../context/view-context/ViewContext';
|
|
@@ -37,9 +36,7 @@ export function TransactionItemWithdrawPending({
|
|
|
37
36
|
defaultTokenImage,
|
|
38
37
|
environment,
|
|
39
38
|
}: TransactionItemWithdrawPendingProps) {
|
|
40
|
-
const { viewDispatch } = useContext(ViewContext);
|
|
41
|
-
const { track } = useAnalytics();
|
|
42
|
-
const translation = useTranslation();
|
|
39
|
+
const { viewDispatch } = useContext(ViewContext); const translation = useTranslation();
|
|
43
40
|
const dateNowUnixMs = useMemo(() => new Date().getTime(), []);
|
|
44
41
|
const withdrawalReadyDate = useMemo(
|
|
45
42
|
() => (transaction.details.current_status.withdrawal_ready_at
|
|
@@ -141,15 +138,6 @@ export function TransactionItemWithdrawPending({
|
|
|
141
138
|
borderTopRightRadius: '0',
|
|
142
139
|
borderTopLeftRadius: '0',
|
|
143
140
|
}}
|
|
144
|
-
onExpandChange={
|
|
145
|
-
(expanded) => expanded
|
|
146
|
-
&& track({
|
|
147
|
-
userJourney: UserJourney.BRIDGE,
|
|
148
|
-
screen: 'TransactionItem',
|
|
149
|
-
control: 'Accordion',
|
|
150
|
-
controlType: 'Button',
|
|
151
|
-
})
|
|
152
|
-
}
|
|
153
141
|
>
|
|
154
142
|
<Accordion.TargetLeftSlot sx={{ pr: 'base.spacing.x2' }}>
|
|
155
143
|
<MenuItem size="xSmall">
|
|
@@ -34,10 +34,6 @@ import {
|
|
|
34
34
|
CryptoFiatActions,
|
|
35
35
|
CryptoFiatContext,
|
|
36
36
|
} from '../../context/crypto-fiat-context/CryptoFiatContext';
|
|
37
|
-
import {
|
|
38
|
-
UserJourney,
|
|
39
|
-
useAnalytics,
|
|
40
|
-
} from '../../context/analytics-provider/SegmentAnalyticsProvider';
|
|
41
37
|
import {
|
|
42
38
|
BridgeActions,
|
|
43
39
|
BridgeContext,
|
|
@@ -111,11 +107,7 @@ export function Transactions({
|
|
|
111
107
|
const {
|
|
112
108
|
bridgeDispatch,
|
|
113
109
|
bridgeState: { checkout, from, tokenBridge },
|
|
114
|
-
} = useContext(BridgeContext);
|
|
115
|
-
const { page } = useAnalytics();
|
|
116
|
-
const { t } = useTranslation();
|
|
117
|
-
const { track } = useAnalytics();
|
|
118
|
-
|
|
110
|
+
} = useContext(BridgeContext); const { t } = useTranslation();
|
|
119
111
|
const [loading, setLoading] = useState(true);
|
|
120
112
|
const [knownTokenMap, setKnownTokenMap] = useState<
|
|
121
113
|
KnownNetworkMap | undefined
|
|
@@ -269,16 +261,6 @@ export function Transactions({
|
|
|
269
261
|
|
|
270
262
|
const handleWalletChange = useCallback(
|
|
271
263
|
async (event: WalletChangeEvent) => {
|
|
272
|
-
track({
|
|
273
|
-
userJourney: UserJourney.BRIDGE,
|
|
274
|
-
screen: 'EmptyStateNotConnected',
|
|
275
|
-
control: 'WalletProvider',
|
|
276
|
-
controlType: 'Select',
|
|
277
|
-
extras: {
|
|
278
|
-
walletProviderName: event.providerDetail.info.name,
|
|
279
|
-
},
|
|
280
|
-
});
|
|
281
|
-
|
|
282
264
|
try {
|
|
283
265
|
let changeAccount = false;
|
|
284
266
|
if (event.providerDetail.info.rdns === WalletProviderRdns.METAMASK) {
|
|
@@ -311,7 +293,7 @@ export function Transactions({
|
|
|
311
293
|
setShowWalletDrawer(false);
|
|
312
294
|
}
|
|
313
295
|
},
|
|
314
|
-
[checkout, bridgeDispatch
|
|
296
|
+
[checkout, bridgeDispatch],
|
|
315
297
|
);
|
|
316
298
|
|
|
317
299
|
const handleBackButtonClick = () => {
|
|
@@ -384,14 +366,6 @@ export function Transactions({
|
|
|
384
366
|
setLoading(false);
|
|
385
367
|
})();
|
|
386
368
|
}, [from, checkout, fetchData]);
|
|
387
|
-
|
|
388
|
-
useEffect(() => {
|
|
389
|
-
page({
|
|
390
|
-
userJourney: UserJourney.BRIDGE,
|
|
391
|
-
screen: 'Transactions',
|
|
392
|
-
});
|
|
393
|
-
}, [page]);
|
|
394
|
-
|
|
395
369
|
return (
|
|
396
370
|
<SimpleLayout
|
|
397
371
|
testId="bridge-view"
|