Skip to content

Commit

Permalink
fix: resolve invalid URL error when block explorer is removed (block-…
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoYu0807 committed Oct 17, 2024
1 parent e4c8de7 commit c9f0dd8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/ui/src/util/getExplorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ export const generateExplorerLink = (
return undefined
}

if (!network.blockExplorerUrls[0].trim()) {
return undefined
}

if (type === "tx") {
return createCustomExplorerLink(value, network.blockExplorerUrls[0])
} else if (type === "address") {
Expand Down

0 comments on commit c9f0dd8

Please sign in to comment.