diff --git a/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/usdc.avalanche-v2.cy.ts b/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/usdc.avalanche-v2.cy.ts index 812aedeff8..2501a182f2 100644 --- a/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/usdc.avalanche-v2.cy.ts +++ b/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/usdc.avalanche-v2.cy.ts @@ -3,9 +3,7 @@ import constants from '../../../../fixtures/constans.json'; import { skipState } from '../../../../support/steps/common'; import { configEnvWithTenderlyAvalancheFork } from '../../../../support/steps/configuration.steps'; import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; -import { - dashboardAssetValuesVerification, -} from '../../../../support/steps/verification.steps'; +import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; const tokensToRequest: RequestedTokens = { diff --git a/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/usdt.avalanche-v2.cy.ts b/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/usdt.avalanche-v2.cy.ts index 77639fadb9..d28c15aa0e 100644 --- a/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/usdt.avalanche-v2.cy.ts +++ b/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/usdt.avalanche-v2.cy.ts @@ -3,9 +3,7 @@ import constants from '../../../../fixtures/constans.json'; import { skipState } from '../../../../support/steps/common'; import { configEnvWithTenderlyAvalancheFork } from '../../../../support/steps/configuration.steps'; import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; -import { - dashboardAssetValuesVerification, -} from '../../../../support/steps/verification.steps'; +import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; const tokensToRequest: RequestedTokens = { diff --git a/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/wbtc.avalanche-v2.cy.ts b/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/wbtc.avalanche-v2.cy.ts index ce762dc3fc..e346070709 100644 --- a/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/wbtc.avalanche-v2.cy.ts +++ b/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/wbtc.avalanche-v2.cy.ts @@ -3,9 +3,7 @@ import constants from '../../../../fixtures/constans.json'; import { skipState } from '../../../../support/steps/common'; import { configEnvWithTenderlyAvalancheFork } from '../../../../support/steps/configuration.steps'; import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; -import { - dashboardAssetValuesVerification, -} from '../../../../support/steps/verification.steps'; +import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; const tokensToRequest: RequestedTokens = { diff --git a/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/weth.avalanche-v2.cy.ts b/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/weth.avalanche-v2.cy.ts index 0b1a9b92ed..a8ec559b99 100644 --- a/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/weth.avalanche-v2.cy.ts +++ b/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/weth.avalanche-v2.cy.ts @@ -3,9 +3,7 @@ import constants from '../../../../fixtures/constans.json'; import { skipState } from '../../../../support/steps/common'; import { configEnvWithTenderlyAvalancheFork } from '../../../../support/steps/configuration.steps'; import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; -import { - dashboardAssetValuesVerification, -} from '../../../../support/steps/verification.steps'; +import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; const tokensToRequest: RequestedTokens = { diff --git a/cypress/e2e/1-v3-markets/0-ethereum-v3-market/0-assets/link.ethereum-v3.cy.ts b/cypress/e2e/1-v3-markets/0-ethereum-v3-market/0-assets/link.ethereum-v3.cy.ts index ff77b1305b..cb41507025 100644 --- a/cypress/e2e/1-v3-markets/0-ethereum-v3-market/0-assets/link.ethereum-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/0-ethereum-v3-market/0-assets/link.ethereum-v3.cy.ts @@ -3,9 +3,7 @@ import constants from '../../../../fixtures/constans.json'; import { skipState } from '../../../../support/steps/common'; import { configEnvWithTenderlyAEthereumV3Fork } from '../../../../support/steps/configuration.steps'; import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; -import { - dashboardAssetValuesVerification, -} from '../../../../support/steps/verification.steps'; +import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; const tokensToRequest: RequestedTokens = { diff --git a/cypress/e2e/1-v3-markets/0-ethereum-v3-market/0-assets/wbtc.ethereum-v3.cy.ts b/cypress/e2e/1-v3-markets/0-ethereum-v3-market/0-assets/wbtc.ethereum-v3.cy.ts index 0057a90ac7..080fa92dc0 100644 --- a/cypress/e2e/1-v3-markets/0-ethereum-v3-market/0-assets/wbtc.ethereum-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/0-ethereum-v3-market/0-assets/wbtc.ethereum-v3.cy.ts @@ -3,9 +3,7 @@ import constants from '../../../../fixtures/constans.json'; import { skipState } from '../../../../support/steps/common'; import { configEnvWithTenderlyAEthereumV3Fork } from '../../../../support/steps/configuration.steps'; import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; -import { - dashboardAssetValuesVerification, -} from '../../../../support/steps/verification.steps'; +import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; const tokensToRequest: RequestedTokens = { diff --git a/cypress/e2e/1-v3-markets/1-arbitrum-v3-market/0-assets/link.arbitrum-v3.cy.ts b/cypress/e2e/1-v3-markets/1-arbitrum-v3-market/0-assets/link.arbitrum-v3.cy.ts index 72f54b7e67..9d6d067049 100644 --- a/cypress/e2e/1-v3-markets/1-arbitrum-v3-market/0-assets/link.arbitrum-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/1-arbitrum-v3-market/0-assets/link.arbitrum-v3.cy.ts @@ -3,9 +3,7 @@ import constants from '../../../../fixtures/constans.json'; import { skipState } from '../../../../support/steps/common'; import { configEnvWithTenderlyArbitrumFork } from '../../../../support/steps/configuration.steps'; import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; -import { - dashboardAssetValuesVerification, -} from '../../../../support/steps/verification.steps'; +import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; const tokensToRequest: RequestedTokens = { diff --git a/cypress/e2e/1-v3-markets/1-arbitrum-v3-market/0-assets/wbtc.arbitrum-v3.cy.ts b/cypress/e2e/1-v3-markets/1-arbitrum-v3-market/0-assets/wbtc.arbitrum-v3.cy.ts index e8d82092d3..6da74645a1 100644 --- a/cypress/e2e/1-v3-markets/1-arbitrum-v3-market/0-assets/wbtc.arbitrum-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/1-arbitrum-v3-market/0-assets/wbtc.arbitrum-v3.cy.ts @@ -3,9 +3,7 @@ import constants from '../../../../fixtures/constans.json'; import { skipState } from '../../../../support/steps/common'; import { configEnvWithTenderlyArbitrumFork } from '../../../../support/steps/configuration.steps'; import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; -import { - dashboardAssetValuesVerification, -} from '../../../../support/steps/verification.steps'; +import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; const tokensToRequest: RequestedTokens = { diff --git a/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/link.avalanche-v3.cy.ts b/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/link.avalanche-v3.cy.ts index ae46e758a4..7400f1b3f6 100644 --- a/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/link.avalanche-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/link.avalanche-v3.cy.ts @@ -3,9 +3,7 @@ import constants from '../../../../fixtures/constans.json'; import { skipState } from '../../../../support/steps/common'; import { configEnvWithTenderlyAvalancheFork } from '../../../../support/steps/configuration.steps'; import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; -import { - dashboardAssetValuesVerification, -} from '../../../../support/steps/verification.steps'; +import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; const tokensToRequest: RequestedTokens = { diff --git a/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/wbtc.avalanche-v3.cy.ts b/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/wbtc.avalanche-v3.cy.ts index ac8f0973e0..21199f33dc 100644 --- a/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/wbtc.avalanche-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/wbtc.avalanche-v3.cy.ts @@ -3,9 +3,7 @@ import constants from '../../../../fixtures/constans.json'; import { skipState } from '../../../../support/steps/common'; import { configEnvWithTenderlyAvalancheFork } from '../../../../support/steps/configuration.steps'; import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; -import { - dashboardAssetValuesVerification, -} from '../../../../support/steps/verification.steps'; +import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; const tokensToRequest: RequestedTokens = { diff --git a/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/weth.avalanche-v3.cy.ts b/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/weth.avalanche-v3.cy.ts index 9905bc7cf3..1eb2bba82e 100644 --- a/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/weth.avalanche-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/weth.avalanche-v3.cy.ts @@ -3,9 +3,7 @@ import constants from '../../../../fixtures/constans.json'; import { skipState } from '../../../../support/steps/common'; import { configEnvWithTenderlyAvalancheFork } from '../../../../support/steps/configuration.steps'; import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; -import { - dashboardAssetValuesVerification, -} from '../../../../support/steps/verification.steps'; +import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; const tokensToRequest: RequestedTokens = { diff --git a/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/link.polygon-v3.cy.ts b/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/link.polygon-v3.cy.ts index 8252e862fa..1adeb3b488 100644 --- a/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/link.polygon-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/link.polygon-v3.cy.ts @@ -3,9 +3,7 @@ import constants from '../../../../fixtures/constans.json'; import { skipState } from '../../../../support/steps/common'; import { configEnvWithTenderlyPolygonFork } from '../../../../support/steps/configuration.steps'; import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; -import { - dashboardAssetValuesVerification, -} from '../../../../support/steps/verification.steps'; +import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; const tokensToRequest: RequestedTokens = { diff --git a/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/wbtc.polygon-v3.cy.ts b/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/wbtc.polygon-v3.cy.ts index c87e473900..370befd8da 100644 --- a/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/wbtc.polygon-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/wbtc.polygon-v3.cy.ts @@ -3,9 +3,7 @@ import constants from '../../../../fixtures/constans.json'; import { skipState } from '../../../../support/steps/common'; import { configEnvWithTenderlyPolygonFork } from '../../../../support/steps/configuration.steps'; import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; -import { - dashboardAssetValuesVerification, -} from '../../../../support/steps/verification.steps'; +import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; const tokensToRequest: RequestedTokens = { diff --git a/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/weth.polygon-v3.cy.ts b/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/weth.polygon-v3.cy.ts index 4a2bf1c401..15f2f908d2 100644 --- a/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/weth.polygon-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/weth.polygon-v3.cy.ts @@ -3,9 +3,7 @@ import constants from '../../../../fixtures/constans.json'; import { skipState } from '../../../../support/steps/common'; import { configEnvWithTenderlyPolygonFork } from '../../../../support/steps/configuration.steps'; import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; -import { - dashboardAssetValuesVerification, -} from '../../../../support/steps/verification.steps'; +import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; const tokensToRequest: RequestedTokens = { diff --git a/cypress/e2e/1-v3-markets/4-optimism-v3-market/0-assets/wbtc.optimism-v3.cy.ts b/cypress/e2e/1-v3-markets/4-optimism-v3-market/0-assets/wbtc.optimism-v3.cy.ts index c8b5a57d6c..963058ac17 100644 --- a/cypress/e2e/1-v3-markets/4-optimism-v3-market/0-assets/wbtc.optimism-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/4-optimism-v3-market/0-assets/wbtc.optimism-v3.cy.ts @@ -3,9 +3,7 @@ import constants from '../../../../fixtures/constans.json'; import { skipState } from '../../../../support/steps/common'; import { configEnvWithTenderlyOptimismFork } from '../../../../support/steps/configuration.steps'; import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; -import { - dashboardAssetValuesVerification, -} from '../../../../support/steps/verification.steps'; +import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; const tokensToRequest: RequestedTokens = { diff --git a/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/link.fantom-v3.cy.ts b/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/link.fantom-v3.cy.ts index e91f383d0f..0d34ed8b1d 100644 --- a/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/link.fantom-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/link.fantom-v3.cy.ts @@ -3,9 +3,7 @@ import constants from '../../../../fixtures/constans.json'; import { skipState } from '../../../../support/steps/common'; import { configEnvWithTenderlyFantomFork } from '../../../../support/steps/configuration.steps'; import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; -import { - dashboardAssetValuesVerification, -} from '../../../../support/steps/verification.steps'; +import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps'; const testData = { depositBaseAmount: { diff --git a/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/wbtc.fantom-v3.cy.ts b/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/wbtc.fantom-v3.cy.ts index 39f9043e04..d4639b5240 100644 --- a/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/wbtc.fantom-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/wbtc.fantom-v3.cy.ts @@ -3,9 +3,7 @@ import constants from '../../../../fixtures/constans.json'; import { skipState } from '../../../../support/steps/common'; import { configEnvWithTenderlyFantomFork } from '../../../../support/steps/configuration.steps'; import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; -import { - dashboardAssetValuesVerification, -} from '../../../../support/steps/verification.steps'; +import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps'; const testData = { depositBaseAmount: { diff --git a/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/weth.fantom-v3.cy.ts b/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/weth.fantom-v3.cy.ts index c4dfe32b1f..ca3337d659 100644 --- a/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/weth.fantom-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/weth.fantom-v3.cy.ts @@ -3,9 +3,7 @@ import constants from '../../../../fixtures/constans.json'; import { skipState } from '../../../../support/steps/common'; import { configEnvWithTenderlyFantomFork } from '../../../../support/steps/configuration.steps'; import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; -import { - dashboardAssetValuesVerification, -} from '../../../../support/steps/verification.steps'; +import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps'; const testData = { depositBaseAmount: { diff --git a/src/components/transactions/Bridge/BridgeConfig.ts b/src/components/transactions/Bridge/BridgeConfig.ts index 2557538439..e6ebcde389 100644 --- a/src/components/transactions/Bridge/BridgeConfig.ts +++ b/src/components/transactions/Bridge/BridgeConfig.ts @@ -21,10 +21,6 @@ type Config = { wrappedNativeOracle: string; // Used to get the fee price in USD lockReleaseTokenPool?: string; // Only exists on Ethereum burnMintTokenPool?: string; // Only exists on non-Ethereum networks - destinations: { - destinationChainId: ChainId; - onRamp: string; - }[]; feeTokens: TokenInfoWithBalance[]; }; @@ -48,12 +44,6 @@ const prodConfig: Config[] = [ tokenOracle: '0x3f12643d3f6f874d39c2a4c9f2cd6f2dbac877fc', wrappedNativeOracle: AaveV3Ethereum.ASSETS.WETH.ORACLE, subgraphUrl: `https://gateway-arbitrum.network.thegraph.com/api/${process.env.NEXT_PUBLIC_SUBGRAPH_API_KEY}/subgraphs/id/E11p8T4Ff1DHZbwSUC527hkUb5innVMdTuP6A2s1xtm1`, - destinations: [ - { - destinationChainId: ChainId.arbitrum_one, - onRamp: '0x925228d7b82d883dde340a55fe8e6da56244a22c', - }, - ], feeTokens: [ { name: 'Gho Token', @@ -92,12 +82,6 @@ const prodConfig: Config[] = [ tokenOracle: '0xb05984ad83c20b3ade7bf97a9a0cb539dde28dbb', wrappedNativeOracle: AaveV3Arbitrum.ASSETS.WETH.ORACLE, subgraphUrl: `https://gateway-arbitrum.network.thegraph.com/api/${process.env.NEXT_PUBLIC_SUBGRAPH_API_KEY}/subgraphs/id/GPpZfiGoDChLsiWoMG5fxXdRNEYrsVDrKJ39moGcbz6i`, - destinations: [ - { - destinationChainId: ChainId.mainnet, - onRamp: '0xce11020d56e5fdbfe46d9fc3021641ffbbb5adee', - }, - ], feeTokens: [ { name: 'Gho Token', @@ -138,13 +122,7 @@ const testnetConfig: Config[] = [ router: '0x0BF3dE8c5D3e8A2B34D2BEeB17ABfCeBaf363A59', tokenOracle: '0x98458D6A99489F15e6eB5aFa67ACFAcf6F211051', // mock oracle wrappedNativeOracle: AaveV3Sepolia.ASSETS.WETH.ORACLE, - subgraphUrl: 'https://api.studio.thegraph.com/query/75867/gho-ccip-sepolia/version/latest', - destinations: [ - { - destinationChainId: ChainId.arbitrum_sepolia, - onRamp: '0xBc09627e58989Ba8F1eDA775e486467d2A00944F', - }, - ], + subgraphUrl: `https://gateway.thegraph.com/api/${process.env.NEXT_PUBLIC_SUBGRAPH_API_KEY}/subgraphs/id/8NWTrc4S6xwaBbajongofytQfQisqYm1zR2ghGEtRFSc`, feeTokens: [ { name: 'Gho Token', @@ -182,13 +160,7 @@ const testnetConfig: Config[] = [ router: '0x2a9C5afB0d0e4BAb2BCdaE109EC4b0c4Be15a165', tokenOracle: '0x1f885520b7BD528E46b390040F12E753Dce43004', // mock oracle wrappedNativeOracle: AaveV3ArbitrumSepolia.ASSETS.WETH.ORACLE, - subgraphUrl: 'https://api.studio.thegraph.com/query/75867/gho-ccip-arb-sepolia/version/latest', - destinations: [ - { - destinationChainId: ChainId.sepolia, - onRamp: '0x64d78F20aD987c7D52FdCB8FB0777bD00de53210', - }, - ], + subgraphUrl: `https://gateway.thegraph.com/api/${process.env.NEXT_PUBLIC_SUBGRAPH_API_KEY}/subgraphs/id/8bpqvL6XBCVhN4heE9rdEwgTketeZ2U5vVGEh5fDoUEH`, feeTokens: [ { name: 'Gho Token', @@ -233,6 +205,16 @@ export function getChainSelectorFor(chainId: ChainId) { return chainSelector; } +export function getChainIdFor(chainSelector: string) { + const chainId = laneConfig.find( + (config) => config.chainSelector === chainSelector + )?.sourceChainId; + if (!chainId) { + throw new Error(`No chainId found for chainSelector ${chainSelector}`); + } + return chainId; +} + export function getRouterFor(chainId: ChainId) { const router = laneConfig.find((config) => config.sourceChainId === chainId)?.router; if (!router) { @@ -245,16 +227,6 @@ export function getSupportedSourceChains() { return laneConfig.map((config) => config.sourceChainId); } -export function getDestinationChainFor(sourceChainId: ChainId, onRamp: string) { - const destinationChainId = laneConfig - .find((config) => config.sourceChainId === sourceChainId) - ?.destinations.find((dest) => dest.onRamp === onRamp)?.destinationChainId; - if (!destinationChainId) { - throw new Error(`No destination chain found for onRamp ${onRamp}`); - } - return destinationChainId; -} - export function getConfigFor(sourceChainId: ChainId) { const config = laneConfig.find((config) => config.sourceChainId === sourceChainId); if (!config) { diff --git a/src/hooks/useBridgeTransactionHistory.tsx b/src/hooks/useBridgeTransactionHistory.tsx index ff079e4024..7aa1173ad3 100644 --- a/src/hooks/useBridgeTransactionHistory.tsx +++ b/src/hooks/useBridgeTransactionHistory.tsx @@ -1,10 +1,7 @@ import { ChainId } from '@aave/contract-helpers'; import { useQuery } from '@tanstack/react-query'; import request, { gql } from 'graphql-request'; -import { - getDestinationChainFor, - laneConfig, -} from 'src/components/transactions/Bridge/BridgeConfig'; +import { getChainIdFor, laneConfig } from 'src/components/transactions/Bridge/BridgeConfig'; type SubgraphBridgeTransaction = { id: string; @@ -15,11 +12,13 @@ type SubgraphBridgeTransaction = { message_sender: string; message_receiver: string; message_sequenceNumber: string; + message_sourceChainSelector: string; message_tokenAmounts: { amount: string; token: string; }[]; transactionHash: string; + destChainSelector: string; }; export type BridgeTransaction = { @@ -39,15 +38,6 @@ export type BridgeTransaction = { transactionHash: string; }; -const networkNameToChainId: { [networkName: string]: ChainId } = { - 'base-sepolia': ChainId.base_sepolia, - 'arbitrum-sepolia': ChainId.arbitrum_sepolia, - sepolia: ChainId.sepolia, - 'avalanche-testnet': ChainId.fuji, - mainnet: ChainId.mainnet, - 'arbitrum-one': ChainId.arbitrum_one, -}; - const sendRequestsQuery = gql` query getSendRequests($sender: String!) { ccipsendRequests(where: { message_sender: $sender }) { @@ -59,11 +49,13 @@ const sendRequestsQuery = gql` message_sender message_receiver message_sequenceNumber + message_sourceChainSelector message_tokenAmounts { amount token } transactionHash + destChainSelector } } `; @@ -78,27 +70,32 @@ const getSendRequests = async (url: string, sender: string) => { ); return result.ccipsendRequests - .map((tx) => { - const sourceChainId = networkNameToChainId[tx.network]; - const destinationChainId = getDestinationChainFor(sourceChainId, tx.address); - if (!destinationChainId) { - throw new Error(`No destination chain found`); - } + .map((tx) => { + try { + // If this throws, it's because there was a tx to a chain that is not currently + // supported in the UI (should mainly just be testnets). Just filter out those txs. + const sourceChainId = getChainIdFor(tx.message_sourceChainSelector); + const destinationChainId = getChainIdFor(tx.destChainSelector); - return { - id: tx.id, - onRampAddress: tx.address, - sourceNetwork: tx.network, - sourceChainId, - destinationChainId, - blockTimestamp: Number(tx.blockTimestamp), - sender: tx.message_sender, - receiver: tx.message_receiver, - sequenceNumber: tx.message_sequenceNumber, - tokenAmounts: tx.message_tokenAmounts, - transactionHash: tx.transactionHash, - }; + return { + id: tx.id, + onRampAddress: tx.address, + sourceNetwork: tx.network, + sourceChainId, + destinationChainId, + blockTimestamp: Number(tx.blockTimestamp), + sender: tx.message_sender, + receiver: tx.message_receiver, + sequenceNumber: tx.message_sequenceNumber, + tokenAmounts: tx.message_tokenAmounts, + transactionHash: tx.transactionHash, + }; + } catch (e) { + console.error(e); + return null; + } }) + .filter((tx): tx is BridgeTransaction => tx !== null) .sort((a, b) => b.blockTimestamp - a.blockTimestamp); }; diff --git a/src/store/poolSelectors.ts b/src/store/poolSelectors.ts index 79ad61e1e3..a16d339d32 100644 --- a/src/store/poolSelectors.ts +++ b/src/store/poolSelectors.ts @@ -1,9 +1,9 @@ import { EmodeCategory } from 'src/helpers/types'; import { FormattedReservesAndIncentives } from 'src/hooks/pool/usePoolFormattedReserves'; +import { fetchIconSymbolAndName } from 'src/ui-config/reservePatches'; import { CustomMarket, marketsData, NetworkConfig } from 'src/utils/marketsAndNetworksConfig'; import { PoolReserve } from './poolSlice'; -import { fetchIconSymbolAndName } from 'src/ui-config/reservePatches'; export const selectCurrentChainIdMarkets = ( chainId: number,