Skip to content

Commit 1743788

Browse files
committed
Remove overrides
1 parent 94edde6 commit 1743788

1 file changed

Lines changed: 1 addition & 43 deletions

File tree

  • packages/checkout/widgets-sample-app/src/components/ui/wallet

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

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
import { useEffect, useMemo, useState } from "react";
1+
import { useEffect, useState } from "react";
22
import {
33
AddTokensEventType,
44
Checkout,
55
OnRampEventType,
66
OrchestrationEventType,
77
WalletEventType,
8-
ChainSlug,
9-
ChainName,
10-
ChainId,
118
WidgetTheme,
129
WidgetType,
1310
Widget,
@@ -16,39 +13,6 @@ import { WidgetsFactory } from "@imtbl/checkout-widgets";
1613
import { Environment } from "@imtbl/config";
1714
import { passport } from "../../../utils/passport";
1815

19-
const ZKEVM_NATIVE_TOKEN = {
20-
name: "IMX",
21-
symbol: "IMX",
22-
decimals: 18,
23-
address: "native",
24-
};
25-
26-
const DEV_CHAIN_ID_NETWORK_MAP = new Map([
27-
[
28-
ChainId.SEPOLIA,
29-
{
30-
chainIdHex: `0x${ChainId.SEPOLIA.toString(16)}`,
31-
chainName: ChainName.SEPOLIA,
32-
rpcUrls: ["https://checkout-api.dev.immutable.com/v1/rpc/eth-sepolia"],
33-
nativeCurrency: {
34-
name: "Sep Eth",
35-
symbol: "ETH",
36-
decimals: 18,
37-
},
38-
blockExplorerUrls: ["https://sepolia.etherscan.io/"],
39-
},
40-
],
41-
[
42-
ChainId.IMTBL_ZKEVM_DEVNET,
43-
{
44-
chainIdHex: `0x${ChainId.IMTBL_ZKEVM_DEVNET.toString(16)}`,
45-
chainName: ChainName.IMTBL_ZKEVM_DEVNET,
46-
rpcUrls: ["https://rpc.dev.immutable.com"],
47-
nativeCurrency: ZKEVM_NATIVE_TOKEN,
48-
},
49-
],
50-
]);
51-
5216
function WalletUI() {
5317
const [wallet, setWallet] = useState<Widget<WidgetType.WALLET> | null>(null);
5418
const [addTokens, setAddTokens] = useState<Widget<WidgetType.ADD_TOKENS> | null>(null);
@@ -61,12 +25,6 @@ function WalletUI() {
6125
environment: Environment.SANDBOX,
6226
},
6327
passport,
64-
overrides: {
65-
networkMap: DEV_CHAIN_ID_NETWORK_MAP,
66-
baseUrl: "https://api.dev.immutable.com",
67-
chainSlug: ChainSlug.IMTBL_ZKEVM_DEVNET,
68-
l2ChainId: ChainId.IMTBL_ZKEVM_DEVNET,
69-
}
7028
});
7129
const factory = new WidgetsFactory(checkout, { theme: WidgetTheme.DARK });
7230
setWallet(factory.create(WidgetType.WALLET));

0 commit comments

Comments
 (0)