Skip to content

Commit

Permalink
refactor: simplify setup
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov committed Jun 8, 2022
1 parent 0215034 commit 8686d38
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 56 deletions.
26 changes: 0 additions & 26 deletions packages/widget/src/config/env.ts
Original file line number Diff line number Diff line change
@@ -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',
};
26 changes: 0 additions & 26 deletions packages/widget/src/config/rpcs.ts

This file was deleted.

5 changes: 1 addition & 4 deletions packages/widget/src/lifi.ts
Original file line number Diff line number Diff line change
@@ -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',
},
Expand Down

0 comments on commit 8686d38

Please sign in to comment.