Files
explorer-monorepo/frontend/src/services/api/bridgeRoutes.test.ts
defiQUG 847cfeb48b
Some checks failed
Deploy Explorer Live / deploy (push) Failing after 14s
Validate Explorer / frontend (push) Successful in 1m35s
Validate Explorer / smoke-e2e (push) Failing after 1m38s
feat(explorer): API-driven CCIP route catalog on bridge page
Load destination bridge contracts from token-aggregation, add fallback polling,
extend smoke tests, and document bridge routes client helper.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-22 21:12:21 -07:00

30 lines
844 B
TypeScript

import { describe, expect, it } from 'vitest'
import { normalizeBridgeRouteEntries, type BridgeRouteCatalog } from './bridgeRoutes'
describe('bridgeRoutesApi helpers', () => {
it('normalizes WETH9 and WETH10 route tables', () => {
const routes: BridgeRouteCatalog = {
weth9: {
'Ethereum Mainnet (1)': '0x1111111111111111111111111111111111111111',
},
weth10: {
'Base (8453)': '0x2222222222222222222222222222222222222222',
},
}
expect(normalizeBridgeRouteEntries(routes)).toEqual([
{
bridge: 'WETH10',
destination: 'Base (8453)',
address: '0x2222222222222222222222222222222222222222',
},
{
bridge: 'WETH9',
destination: 'Ethereum Mainnet (1)',
address: '0x1111111111111111111111111111111111111111',
},
])
})
})