Skip to content

Commit

Permalink
Update channel destination (#403)
Browse files Browse the repository at this point in the history
* Updates to the relayers table as the files no longer use chain id but the chain name

* Removal of the Destination Chain column

* fix: add name as fallback

---------

Co-authored-by: eliasmpw <[email protected]>
  • Loading branch information
emperorjm and eliasmpw authored Oct 5, 2023
1 parent 0ff5801 commit ad1c465
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions components/content/IBC/RelayersTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,21 @@
// --------------------------------------------------------------------------------
// Update here to add chain names with their chain id
const chainIds = {
'osmo-test-5': 'Osmosis',
'axelar-testnet-lisbon-3': 'Axelar',
'theta-testnet-001': 'Cosmos Hub',
'osmosis-1': 'Osmosis',
'axelar-dojo-1': 'Axelar',
'cosmoshub-4': 'Cosmos Hub',
'jackal-1': 'Jackal',
'juno-1': 'Juno',
'kaiyo-1': 'Kujira',
'umee-1': 'Umee',
'osmosistestnet': 'Osmosis',
'axelartestnet': 'Axelar',
'akashtestnet': 'Akash',
'agoric': 'Agoric',
'axelar': 'Axelar',
'bitcanna': 'Bitcanna',
'cosmoshub': 'Cosmos Hub',
'jackal': 'Jackal',
'juno': 'Juno',
'kujira': 'Kujira',
'noble': 'Noble',
'nois': 'Nois',
'osmosis': 'Osmosis',
'quicksilver': 'Quicksilver',
'umee': 'Umee',
};
// --------------------------------------------------------------------------------
Expand All @@ -30,8 +35,8 @@
// Build markdown table
const markdownHeader = `
| **Source Channel** | **Destination** | **Destination Chain ID** | **Destination Channel** |
| :----------------- |:----------------|------------------------------|-------------------------|
| **Source Channel** | **Destination** | **Destination Channel** |
| :----------------- |:----------------|-------------------------|
`;
const markdownContent = computed(
() =>
Expand All @@ -41,8 +46,8 @@
.map(
channel =>
`| ${channel.chain_1.channel_id} | ${
Object.entries(chainIds).find(item => item[0] === relayer.chain_2.chain_name)?.[1] || ''
} | ${relayer.chain_2.chain_name} | ${channel.chain_2.channel_id} |`
Object.entries(chainIds).find(item => item[0] === relayer.chain_2.chain_name)?.[1] || relayer.chain_2.chain_name
} | ${channel.chain_2.channel_id} |`
)
.join('\n')
)
Expand Down

0 comments on commit ad1c465

Please sign in to comment.