From 536f7aad01c43568501dfccc1af1d5332ad576e0 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Thu, 15 Dec 2022 23:58:52 +0400 Subject: [PATCH] Add to MM button explorer URL fix --- CHANGELOG.md | 1 + apps/block_scout_web/assets/js/lib/add_chain_to_mm.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8da0f0196e..e20ffe71f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ ### Fixes +- [#6603](https://github.com/blockscout/blockscout/pull/6603) - Add to MM button explorer URL fix - [#6512](https://github.com/blockscout/blockscout/pull/6512) - Allow gasUsed in failed internal txs; Leave error field for staticcall - [#6532](https://github.com/blockscout/blockscout/pull/6532) - Fix index creation migration - [#6473](https://github.com/blockscout/blockscout/pull/6473) - Fix state changes for contract creation transactions diff --git a/apps/block_scout_web/assets/js/lib/add_chain_to_mm.js b/apps/block_scout_web/assets/js/lib/add_chain_to_mm.js index d10820f1da..4ed32dd635 100644 --- a/apps/block_scout_web/assets/js/lib/add_chain_to_mm.js +++ b/apps/block_scout_web/assets/js/lib/add_chain_to_mm.js @@ -8,8 +8,9 @@ export async function addChainToMM ({ btn }) { const coinName = document.getElementById('js-coin-name').value const subNetwork = document.getElementById('js-subnetwork').value const jsonRPC = document.getElementById('js-json-rpc').value + const path = process.env.NETWORK_PATH || '/' - const blockscoutURL = location.protocol + '//' + location.host + process.env.NETWORK_PATH + const blockscoutURL = location.protocol + '//' + location.host + path if (chainIDFromWallet !== chainIDFromInstance) { await window.ethereum.request({ method: 'wallet_addEthereumChain',