From 63037f1bf17a5e71bcb6ac0cc8172ade94c0e06f Mon Sep 17 00:00:00 2001 From: joaquim-verges Date: Thu, 17 Oct 2024 05:45:07 +0000 Subject: [PATCH] fix: ensure valid block explorer URL for address links (#5061) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem solved Short description of the bug fixed or feature added --- ## PR-Codex overview This PR focuses on updating the `href` attribute in the `metadata-header.tsx` file to ensure that the URL for the block explorer correctly appends the address, handling cases where the URL may or may not end with a trailing slash. ### Detailed summary - Modified the `href` attribute to check if `validBlockExplorer.url` ends with a `/`. - If it does not, a `/` is added before appending `address/${address}`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .../custom-contract/contract-header/metadata-header.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dashboard/src/components/custom-contract/contract-header/metadata-header.tsx b/apps/dashboard/src/components/custom-contract/contract-header/metadata-header.tsx index 7b94eb1a545..f44b2c25a78 100644 --- a/apps/dashboard/src/components/custom-contract/contract-header/metadata-header.tsx +++ b/apps/dashboard/src/components/custom-contract/contract-header/metadata-header.tsx @@ -117,7 +117,7 @@ export const MetadataHeader: React.FC = ({ ))}