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>
30 lines
844 B
TypeScript
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',
|
|
},
|
|
])
|
|
})
|
|
})
|