From 4b8a1097c0a9be4fbe08c1bf406ad604a8c83607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Riquelme=20Guzm=C3=A1n?= Date: Fri, 29 Sep 2023 20:17:06 -0300 Subject: [PATCH] chore: chronos and base icons and minor fixes for this networks --- .github/workflows/cf-deploy-test.yml | 2 +- public/assets/icons/base.svg | 4 ++++ public/assets/icons/cronos.svg | 16 ++++++++++++++++ src/pages/DetailView/DetailView.tsx | 8 ++++---- src/types/explorer.ts | 1 + src/utils/Helpers.tsx | 8 ++++++++ 6 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 public/assets/icons/base.svg create mode 100644 public/assets/icons/cronos.svg diff --git a/.github/workflows/cf-deploy-test.yml b/.github/workflows/cf-deploy-test.yml index 102321a..1c5e2bf 100644 --- a/.github/workflows/cf-deploy-test.yml +++ b/.github/workflows/cf-deploy-test.yml @@ -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: diff --git a/public/assets/icons/base.svg b/public/assets/icons/base.svg new file mode 100644 index 0000000..9fc6d5b --- /dev/null +++ b/public/assets/icons/base.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/assets/icons/cronos.svg b/public/assets/icons/cronos.svg new file mode 100644 index 0000000..2aa366b --- /dev/null +++ b/public/assets/icons/cronos.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/pages/DetailView/DetailView.tsx b/src/pages/DetailView/DetailView.tsx index 497a478..b51e5e2 100644 --- a/src/pages/DetailView/DetailView.tsx +++ b/src/pages/DetailView/DetailView.tsx @@ -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} ) : ( - <>{transfer?.sender} + <>{transfer?.accountId} )} diff --git a/src/types/explorer.ts b/src/types/explorer.ts index 82294d4..a9a67a6 100644 --- a/src/types/explorer.ts +++ b/src/types/explorer.ts @@ -102,6 +102,7 @@ export type Transfer = { fee: { amount: string; tokenAddress: string; tokenSymbol: string } resourceID: string usdValue: number + accountId: string } export type ExplorerState = { diff --git a/src/utils/Helpers.tsx b/src/utils/Helpers.tsx index 7e45f7a..841f0ee 100644 --- a/src/utils/Helpers.tsx +++ b/src/utils/Helpers.tsx @@ -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" } @@ -218,6 +222,10 @@ export const renderNetworkIcon = (chainId: number, classes: Record<"networkIcon" return substrate case 5232: return substrate + case 84531: + return base + case 338: + return cronos default: return ethereum }