Skip to content

Commit

Permalink
chore: chronos and base icons and minor fixes for this networks
Browse files Browse the repository at this point in the history
  • Loading branch information
wainola committed Sep 29, 2023
1 parent fdcf161 commit 4b8a109
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cf-deploy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
env:
VITE_INDEXER_URL: "https://api.test.buildwithsygma.com"
VITE_SHARED_CONFIG_URL: "https://chainbridge-assets-stage.s3.us-east-2.amazonaws.com/shared-config-test.json"
VITE_EXPLORER_URLS: '[{ "id": 1, "url": "https://goerli.etherscan.io" }, { "id": 2, "url": "https://sepolia.etherscan.io" }]'
VITE_EXPLORER_URLS: '[{ "id": 1, "url": "https://goerli.etherscan.io" }, { "id": 2, "url": "https://sepolia.etherscan.io" }, { "id": 4, "url": "https://base-goerli.blockscout.com" }, { "id": 5, "url": "https://explorer.cronos.org/testnet" }]'
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@1
with:
Expand Down
4 changes: 4 additions & 0 deletions public/assets/icons/base.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions public/assets/icons/cronos.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions src/pages/DetailView/DetailView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,14 @@ export default function DetailView() {
}}
to={
fromDomainInfo!.type !== "evm"
? `${fromDomainExplorerUrl?.url}/account/${transfer?.sender}`
: `${fromDomainExplorerUrl?.url}/address/${transfer?.sender}`
? `${fromDomainExplorerUrl?.url}/account/${transfer?.accountId}`
: `${fromDomainExplorerUrl?.url}/address/${transfer?.accountId}`
}
>
{transfer?.sender}
{transfer?.accountId}
</Link>
) : (
<>{transfer?.sender}</>
<>{transfer?.accountId}</>
)}
</span>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/types/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export type Transfer = {
fee: { amount: string; tokenAddress: string; tokenSymbol: string }
resourceID: string
usdValue: number
accountId: string
}

export type ExplorerState = {
Expand Down
8 changes: 8 additions & 0 deletions src/utils/Helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ export const getNetworkNames = (chainId: number): string => {
return "Khala"
case 5233:
return "Phala"
case 84531:
return "Base"
case 338:
return "Cronos"
default:
return "Ethereum"
}
Expand Down Expand Up @@ -218,6 +222,10 @@ export const renderNetworkIcon = (chainId: number, classes: Record<"networkIcon"
return <img src={`/assets/icons/phala-black.svg`} alt="substrate" className={classes.substrateNetworkIcon} />
case 5232:
return <img src={`/assets/icons/khala.svg`} alt="substrate" className={classes.substrateNetworkIcon} />
case 84531:
return <img src={`/assets/icons/base.svg`} alt="base" className={classes.networkIcon} />
case 338:
return <img src={`/assets/icons/cronos.svg`} alt="cronos" className={classes.networkIcon} />
default:
return <img src={`/assets/icons/all.svg`} alt="ethereum" className={classes.networkIcon} />
}
Expand Down

0 comments on commit 4b8a109

Please sign in to comment.