-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: added chain icon in criteria condition
- Loading branch information
1 parent
04d637b
commit d52e687
Showing
6 changed files
with
165 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
packages/uiweb/src/lib/components/chat/constants/chainDetails.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
|
||
import Tooltip from "../../tooltip"; | ||
|
||
import { EthereumSvg } from '../../../icons/EthereumSvg'; | ||
import { PolygonSvg } from "../../../icons/PolygonSvg"; | ||
import { BSCSvg } from "../../../icons/BSCSvg"; | ||
import { OptimismSvg } from "../../../icons/OptimismSvg"; | ||
import { PolygonzkevmSvg } from "../../../icons/PolygonzkevmSvg"; | ||
import { ArbitrumSvg } from "../../../icons/ArbitrumSvg" | ||
import React from "react"; | ||
|
||
const createSVGIcon = (element:any, chainName: string) => { | ||
return ( | ||
<Tooltip tooltipContent={`${chainName}`}> | ||
{element} | ||
</Tooltip> | ||
); | ||
}; | ||
|
||
export const NETWORK_ICON_DETAILS = { | ||
5: { | ||
label: 'ETHEREUM GOERLI', | ||
icon: createSVGIcon(<EthereumSvg/>, 'Ethereum Goerli'), | ||
}, | ||
1: { | ||
label: 'ETHEREUM MAINNET', | ||
icon: createSVGIcon(<EthereumSvg/>, 'Ethereum Mainnet'), | ||
}, | ||
80001: { | ||
label: 'POLYGON MUMBAI', | ||
icon: createSVGIcon(<PolygonSvg/>, 'Polygon Mumbai'), | ||
}, | ||
137: { | ||
label: 'POLYGON MAINNET', | ||
icon: createSVGIcon(<PolygonSvg/>, 'Polygon Mainnet'), | ||
}, | ||
97: { | ||
label: 'BSC TESTNET', | ||
icon: createSVGIcon(<BSCSvg/>, 'Bsc Testnet'), | ||
}, | ||
56: { | ||
label: 'BSC MAINNET', | ||
icon: createSVGIcon(<BSCSvg/>, 'Bsc Mainnet'), | ||
}, | ||
420: { | ||
label: 'OPTIMISM TESTNET', | ||
icon: createSVGIcon(<OptimismSvg/>, 'Optimism Testnet'), | ||
}, | ||
10: { | ||
label: 'OPTIMISM MAINNET', | ||
icon: createSVGIcon(<OptimismSvg/>, 'Optimism Mainnet'), | ||
}, | ||
1442: { | ||
label: 'POLYGON ZK EVM TESTNET', | ||
icon: createSVGIcon(<PolygonzkevmSvg/>, 'Polygon ZK EVM Testnet'), | ||
}, | ||
1101: { | ||
label: 'POLYGON ZK EVM MAINNET', | ||
icon: createSVGIcon(<PolygonzkevmSvg/>, 'Polygon ZK EVM Mainnet'), | ||
}, | ||
|
||
42161: { | ||
label: 'ARBITRUMONE MAINNET', | ||
icon: createSVGIcon(<ArbitrumSvg/>, 'Arbitrum Mainnet'), | ||
}, | ||
421613: { | ||
label: 'ARBITRUM TESTNET', | ||
icon: createSVGIcon(<ArbitrumSvg/>, 'Arbitrum Testnet'), | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.