Skip to content

Commit

Permalink
fix(tangle-dapp): Chain display name (#2699)
Browse files Browse the repository at this point in the history
Co-authored-by: Pavan Soratur <[email protected]>
  • Loading branch information
devpavan04 and Pavan Soratur authored Dec 16, 2024
1 parent 21c35e6 commit 022ffc4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions libs/webb-ui-components/src/components/ChainChip/ChainChip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ export const ChainChip = React.forwardRef<HTMLSpanElement, ChainChipProps>(
? 'linea'
: chainName.toLowerCase().includes('bnb')
? 'bsc'
: chainName,
: chainName.toLowerCase().includes('op')
? 'optimism'
: chainName.toLowerCase().includes('arbitrum')
? 'arbitrum'
: chainName,
[chainName],
);

Expand All @@ -70,7 +74,11 @@ export const ChainChip = React.forwardRef<HTMLSpanElement, ChainChipProps>(
? 'BSC'
: chainName.toLowerCase().includes('linea')
? 'Linea'
: chainName.split(' ').pop();
: chainName.toLowerCase().includes('op')
? 'Optimism'
: chainName.toLowerCase().includes('arbitrum')
? 'Arbitrum'
: chainName.split(' ').pop();
}, [chainName]);

return (
Expand Down

0 comments on commit 022ffc4

Please sign in to comment.