Skip to content

Commit 824456f

Browse files
author
jagdeep sidhu
committed
rm custom l2 json rpc provider
1 parent 79678c7 commit 824456f

File tree

7 files changed

+28
-445
lines changed

7 files changed

+28
-445
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"@heroicons/react": "^1.0.6",
6464
"@reduxjs/toolkit": "^2.8.2",
6565
"@sidhujag/sysweb3-core": "^1.0.27",
66-
"@sidhujag/sysweb3-keyring": "^1.0.548",
66+
"@sidhujag/sysweb3-keyring": "^1.0.549",
6767
"@sidhujag/sysweb3-network": "^1.0.105",
6868
"@sidhujag/sysweb3-utils": "^1.1.270",
6969
"@tippyjs/react": "^4.2.6",

source/scripts/Background/controllers/balances/evm.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import { formatEther } from '@ethersproject/units';
22
import {
33
CustomJsonRpcProvider,
4-
CustomL2JsonRpcProvider,
54
IKeyringAccountState,
65
} from '@sidhujag/sysweb3-keyring';
76

87
import { IEvmBalanceController } from './types';
98

109
const EvmBalanceController = (
11-
web3Provider: CustomJsonRpcProvider | CustomL2JsonRpcProvider
10+
web3Provider: CustomJsonRpcProvider
1211
): IEvmBalanceController => {
1312
const getEvmBalanceForAccount = async (
1413
currentAccount: IKeyringAccountState

source/scripts/Background/controllers/balances/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {
22
CustomJsonRpcProvider,
3-
CustomL2JsonRpcProvider,
43
IKeyringAccountState,
54
} from '@sidhujag/sysweb3-keyring';
65

@@ -13,7 +12,7 @@ const BalancesManager = (): IBalancesManager => {
1312
currentAccount: IKeyringAccountState,
1413
isBitcoinBased: boolean,
1514
networkUrl: string,
16-
provider: CustomJsonRpcProvider | CustomL2JsonRpcProvider
15+
provider: CustomJsonRpcProvider
1716
) => {
1817
switch (isBitcoinBased) {
1918
case true:

source/scripts/Background/controllers/balances/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {
22
CustomJsonRpcProvider,
3-
CustomL2JsonRpcProvider,
43
IKeyringAccountState,
54
} from '@sidhujag/sysweb3-keyring';
65

@@ -22,7 +21,7 @@ export interface IBalancesManagerUtils {
2221
currentAccount: IKeyringAccountState,
2322
isBitcoinBased: boolean,
2423
networkUrl: string,
25-
provider: CustomJsonRpcProvider | CustomL2JsonRpcProvider | null
24+
provider: CustomJsonRpcProvider | null
2625
) => Promise<string>;
2726
}
2827

source/scripts/Background/handlers/handleListeners.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ jest.mock('@sidhujag/sysweb3-keyring', () => ({
9595
},
9696
// Mock other necessary constants or types if their absence causes import errors
9797
CustomJsonRpcProvider: jest.fn(),
98-
CustomL2JsonRpcProvider: jest.fn(),
9998
// Mock network utility functions used in constants.ts
10099
getSyscoinUTXOMainnetNetwork: jest.fn(() => ({
101100
chainId: 57,

source/utils/constants.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,8 @@ export const CHAIN_IDS = {
2020
ROLLUX_MAINNET: 570,
2121
ROLLUX_TESTNET: 57000,
2222
ETHEREUM_MAINNET: 1,
23-
ZKSYNC_ERA_MAINNET: 324,
24-
ZKSYNC_ERA_TESTNET: 300,
2523
} as const;
2624

27-
// zkSync Era networks that require CustomL2JsonRpcProvider (zksync-ethers.Provider)
28-
export const L2_NETWORK_CHAIN_IDS: number[] = [
29-
CHAIN_IDS.ZKSYNC_ERA_MAINNET, // 324 - zkSync Era Mainnet
30-
CHAIN_IDS.ZKSYNC_ERA_TESTNET, // 300 - zkSync Era Sepolia Testnet
31-
];
32-
3325
export const INITIAL_FEE = {
3426
baseFee: 0,
3527
gasPrice: 0,

0 commit comments

Comments
 (0)