Skip to content

Commit

Permalink
2433, fix lifi supported-chains config (#631)
Browse files Browse the repository at this point in the history
  • Loading branch information
PseudoElement authored May 8, 2024
2 parents 63979b5 + 8431526 commit 2463213
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rubic-sdk",
"version": "5.17.7",
"version": "5.17.8",
"description": "Simplify dApp creation",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const lifiCrossChainSupportedBlockchains = [
BLOCKCHAIN_NAME.POLYGON_ZKEVM,
BLOCKCHAIN_NAME.ZK_SYNC,
BLOCKCHAIN_NAME.LINEA
// BLOCKCHAIN_NAME.MODE
] as const;

export type LifiCrossChainSupportedBlockchain = (typeof lifiCrossChainSupportedBlockchains)[number];

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { BLOCKCHAIN_NAME } from 'src/core/blockchain/models/blockchain-name';

export const lifiOnChainSupportedBlockchains = [
BLOCKCHAIN_NAME.ETHEREUM,
BLOCKCHAIN_NAME.BINANCE_SMART_CHAIN,
BLOCKCHAIN_NAME.POLYGON,
BLOCKCHAIN_NAME.AVALANCHE,
BLOCKCHAIN_NAME.FANTOM,
BLOCKCHAIN_NAME.MOONRIVER,
BLOCKCHAIN_NAME.ARBITRUM,
BLOCKCHAIN_NAME.OPTIMISM,
BLOCKCHAIN_NAME.GNOSIS,
BLOCKCHAIN_NAME.FUSE,
BLOCKCHAIN_NAME.MOONBEAM,
BLOCKCHAIN_NAME.BASE,
BLOCKCHAIN_NAME.POLYGON_ZKEVM,
BLOCKCHAIN_NAME.ZK_SYNC,
BLOCKCHAIN_NAME.LINEA
// BLOCKCHAIN_NAME.MODE
] as const;

export type LifiOnChainSupportedBlockchain = (typeof lifiOnChainSupportedBlockchains)[number];
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { combineOptions } from 'src/common/utils/options';
import { BlockchainName, EvmBlockchainName } from 'src/core/blockchain/models/blockchain-name';
import { blockchainId } from 'src/core/blockchain/utils/blockchains-info/constants/blockchain-id';
import { getLifiConfig } from 'src/features/common/providers/lifi/constants/lifi-config';
import { lifiForbiddenBlockchains } from 'src/features/on-chain/calculation-manager/providers/aggregators/lifi/constants/lifi-forbidden-blockchains';
import {
LIFI_API_ON_CHAIN_PROVIDERS,
LIFI_DISABLED_ON_CHAIN_PROVIDERS
} from 'src/features/on-chain/calculation-manager/providers/aggregators/lifi/constants/lifi-providers';
import { lifiOnChainSupportedBlockchains } from 'src/features/on-chain/calculation-manager/providers/aggregators/lifi/constants/lifi-supported-blockchains';
import { LifiTrade } from 'src/features/on-chain/calculation-manager/providers/aggregators/lifi/lifi-trade';
import {
LifiCalculationOptions,
Expand Down Expand Up @@ -39,7 +39,7 @@ export class LifiProvider extends AggregatorOnChainProvider {
};

protected isSupportedBlockchain(blockchain: BlockchainName): boolean {
return !lifiForbiddenBlockchains.some(forbiddenChain => forbiddenChain === blockchain);
return lifiOnChainSupportedBlockchains.some(chain => chain === blockchain);
}

public async calculate(
Expand Down

0 comments on commit 2463213

Please sign in to comment.