1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Using URL util to parse hostname for block explorer link (#12241)

This commit is contained in:
ryanml 2021-09-30 09:14:20 -07:00 committed by GitHub
parent 1c5489e046
commit 730605353a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,7 +81,7 @@ export default class AccountDetailsModal extends Component {
>
{rpcPrefs.blockExplorerUrl
? this.context.t('blockExplorerView', [
rpcPrefs.blockExplorerUrl.match(/^https?:\/\/(.+)/u)[1],
getURLHostName(rpcPrefs.blockExplorerUrl),
])
: this.context.t('viewOnEtherscan', [
this.context.t('blockExplorerAccountAction'),