@@ -2,6 +2,7 @@ import Address from "~/components/AddressReact.tsx"
22import "./Table.css"
33import { drawerContentStore } from "../Drawer/drawerStore.ts"
44import { Environment , SupportedTokenConfig , tokenPoolDisplay , PoolType } from "~/config/data/ccip/index.ts"
5+ import { areAllLanesPaused } from "~/config/data/ccip/utils.ts"
56import { ChainType , ExplorerInfo } from "~/config/types.ts"
67import TableSearchInput from "./TableSearchInput.tsx"
78import { useState } from "react"
@@ -64,66 +65,79 @@ function TokenChainsTable({ networks, token, lanes, environment }: TableProps) {
6465 < tbody >
6566 { networks
6667 ?. filter ( ( network ) => network . name . toLowerCase ( ) . includes ( search . toLowerCase ( ) ) )
67- . map ( ( network , index ) => (
68- < tr key = { index } >
69- < td >
70- < div
71- className = "ccip-table__network-name"
72- role = "button"
73- onClick = { ( ) => {
74- drawerContentStore . set ( ( ) => (
75- < TokenDrawer
76- token = { token }
77- network = { network }
78- destinationLanes = { lanes [ network . key ] }
79- environment = { environment }
68+ . map ( ( network , index ) => {
69+ // Check if all lanes for this token on this network are paused
70+ const allLanesPaused = areAllLanesPaused ( network . tokenDecimals , lanes [ network . key ] || { } )
71+
72+ return (
73+ < tr key = { index } className = { allLanesPaused ? "ccip-table__row--paused" : "" } >
74+ < td >
75+ < div
76+ className = { `ccip-table__network-name ${ allLanesPaused ? "ccip-table__network-name--paused" : "" } ` }
77+ role = "button"
78+ onClick = { ( ) => {
79+ drawerContentStore . set ( ( ) => (
80+ < TokenDrawer
81+ token = { token }
82+ network = { network }
83+ destinationLanes = { lanes [ network . key ] }
84+ environment = { environment }
85+ />
86+ ) )
87+ } }
88+ >
89+ < span className = "ccip-table__logoContainer" >
90+ < img
91+ src = { network . logo }
92+ alt = { network . name }
93+ className = "ccip-table__logo"
94+ onError = { ( { currentTarget } ) => {
95+ currentTarget . onerror = null // prevents looping
96+ currentTarget . src = fallbackTokenIconUrl
97+ } }
98+ />
99+ < img
100+ src = { network . tokenLogo }
101+ alt = { network . tokenId }
102+ className = "ccip-table__smallLogo"
103+ onError = { ( { currentTarget } ) => {
104+ currentTarget . onerror = null // prevents looping
105+ currentTarget . src = fallbackTokenIconUrl
106+ } }
80107 />
81- ) )
82- } }
83- >
84- < span className = "ccip-table__logoContainer" >
85- < img
86- src = { network . logo }
87- alt = { network . name }
88- className = "ccip-table__logo"
89- onError = { ( { currentTarget } ) => {
90- currentTarget . onerror = null // prevents looping
91- currentTarget . src = fallbackTokenIconUrl
92- } }
93- />
94- < img
95- src = { network . tokenLogo }
96- alt = { network . tokenId }
97- className = "ccip-table__smallLogo"
98- onError = { ( { currentTarget } ) => {
99- currentTarget . onerror = null // prevents looping
100- currentTarget . src = fallbackTokenIconUrl
101- } }
102- />
103- </ span >
104- { network . name }
105- </ div >
106- </ td >
107- < td > { network . tokenName } </ td >
108- < td > { network . tokenSymbol } </ td >
109- < td > { network . tokenDecimals } </ td >
110- < td data-clipboard-type = "token" >
111- < Address
112- contractUrl = { getExplorerAddressUrl ( network . explorer ) ( network . tokenAddress ) }
113- address = { network . tokenAddress }
114- endLength = { 6 }
115- />
116- </ td >
117- < td > { tokenPoolDisplay ( network . tokenPoolType ) } </ td >
118- < td data-clipboard-type = "token-pool" >
119- < Address
120- contractUrl = { getExplorerAddressUrl ( network . explorer ) ( network . tokenPoolAddress ) }
121- address = { network . tokenPoolAddress }
122- endLength = { 6 }
123- />
124- </ td >
125- </ tr >
126- ) ) }
108+ </ span >
109+ { network . name }
110+ { allLanesPaused && (
111+ < span
112+ className = "ccip-table__paused-badge"
113+ title = "All transfers from this network are currently paused"
114+ >
115+ ⏸️
116+ </ span >
117+ ) }
118+ </ div >
119+ </ td >
120+ < td > { network . tokenName } </ td >
121+ < td > { network . tokenSymbol } </ td >
122+ < td > { network . tokenDecimals } </ td >
123+ < td data-clipboard-type = "token" >
124+ < Address
125+ contractUrl = { getExplorerAddressUrl ( network . explorer ) ( network . tokenAddress ) }
126+ address = { network . tokenAddress }
127+ endLength = { 6 }
128+ />
129+ </ td >
130+ < td > { tokenPoolDisplay ( network . tokenPoolType ) } </ td >
131+ < td data-clipboard-type = "token-pool" >
132+ < Address
133+ contractUrl = { getExplorerAddressUrl ( network . explorer ) ( network . tokenPoolAddress ) }
134+ address = { network . tokenPoolAddress }
135+ endLength = { 6 }
136+ />
137+ </ td >
138+ </ tr >
139+ )
140+ } ) }
127141 </ tbody >
128142 </ table >
129143 < div className = "ccip-table__notFound" >
0 commit comments