diff --git a/packages/widget/src/config/env.ts b/packages/widget/src/config/env.ts index 52c7e7f10..6df81354d 100644 --- a/packages/widget/src/config/env.ts +++ b/packages/widget/src/config/env.ts @@ -1,29 +1,3 @@ export const env = { LIFI_API_URL: 'https://li.quest/v1/', // 'https://developkub.li.finance/v1/', - - // RPC - Mainnet (overwrites) - LIFI_RPC_URL_MAINNET: - 'https://speedy-nodes-nyc.moralis.io/5ed6053dc39eba789ff466c9/eth/mainnet', - // LIFI_RPC_URL_POLYGON: - // LIFI_RPC_URL_BSC: - // LIFI_RPC_URL_XDAI: - // LIFI_RPC_URL_FANTOM: - // LIFI_RPC_URL_ARBITRUM: - - // RPC - Testnet (overwrites) - LIFI_RPC_URL_ROPSTEN: - 'https://ropsten.infura.io/v3/c7fe4abb5bbc466cb56038efbb0b9930', - LIFI_RPC_URL_RINKEBY: - 'https://rinkeby.infura.io/v3/c7fe4abb5bbc466cb56038efbb0b9930', - LIFI_RPC_URL_GORLI: - 'https://goerli.infura.io/v3/c7fe4abb5bbc466cb56038efbb0b9930', - LIFI_RPC_URL_KOVAN: - 'https://kovan.infura.io/v3/c7fe4abb5bbc466cb56038efbb0b9930', - LIFI_RPC_URL_ARBITRUM_RINKEBY: - 'https://arbitrum-rinkeby.infura.io/v3/c7fe4abb5bbc466cb56038efbb0b9930', - LIFI_RPC_URL_OPTIMISM_KOVAN: - 'https://optimism-kovan.infura.io/v3/c7fe4abb5bbc466cb56038efbb0b9930', - LIFI_RPC_URL_POLYGON_MUMBAI: - 'https://rpc-mumbai.maticvigil.com/v1/e4dadaac060844094a667194c20f79cc9bb0bc59', - LIFI_RPC_URL_BSC_TESTNET: 'https://data-seed-prebsc-1-s2.binance.org:8545', }; diff --git a/packages/widget/src/config/rpcs.ts b/packages/widget/src/config/rpcs.ts deleted file mode 100644 index 93ddefe81..000000000 --- a/packages/widget/src/config/rpcs.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { ChainId } from '@lifinance/sdk'; -import { env } from './env'; - -const rpcs: Record = { - [ChainId.ETH]: [env.LIFI_RPC_URL_MAINNET], - // [ChainId.POL]: [env.LIFI_RPC_URL_POLYGON], - // [ChainId.BSC]: [env.LIFI_RPC_URL_BSC], - // [ChainId.DAI]: [env.LIFI_RPC_URL_XDAI], - // [ChainId.FTM]: [env.LIFI_RPC_URL_FANTOM], - // [ChainId.ARB]: [env.LIFI_RPC_URL_ARBITRUM], - - // Testnet - [ChainId.ROP]: [env.LIFI_RPC_URL_ROPSTEN], - [ChainId.RIN]: [env.LIFI_RPC_URL_RINKEBY], - [ChainId.GOR]: [env.LIFI_RPC_URL_GORLI], - [ChainId.KOV]: [env.LIFI_RPC_URL_KOVAN], - [ChainId.ARBT]: [env.LIFI_RPC_URL_ARBITRUM_RINKEBY], - [ChainId.OPTT]: [env.LIFI_RPC_URL_OPTIMISM_KOVAN], - [ChainId.MUM]: [env.LIFI_RPC_URL_POLYGON_MUMBAI], - [ChainId.BSCT]: [env.LIFI_RPC_URL_BSC_TESTNET], -}; - -export const getRpcs = (): Record => - Object.fromEntries( - Object.entries(rpcs).filter(([_, value]) => !value), - ) as Record; diff --git a/packages/widget/src/lifi.ts b/packages/widget/src/lifi.ts index 5687122ef..6007b15d9 100644 --- a/packages/widget/src/lifi.ts +++ b/packages/widget/src/lifi.ts @@ -1,10 +1,7 @@ import LIFI from '@lifinance/sdk'; -import { env } from './config/env'; -import { getRpcs } from './config/rpcs'; export const LiFi = new LIFI({ - apiUrl: env.LIFI_API_URL, - rpcs: getRpcs(), + // apiUrl: env.LIFI_API_URL, defaultRouteOptions: { integrator: 'li.fi', },