diff --git a/CHANGELOG.md b/CHANGELOG.md index af7c71d..4594b56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +### v3.5.0 + +- [feat] Change logo +- [feat] Update to support the new appearance of BNB Chain + ### v3.4.2 - [fix] Fix some style issues diff --git a/manifest.config.ts b/manifest.config.ts index 739dcba..c15ce42 100644 --- a/manifest.config.ts +++ b/manifest.config.ts @@ -20,7 +20,6 @@ export default defineManifest((env: ConfigEnv) => ({ { matches: [ '*://polygonscan.com/*', - '*://*.bscscan.com/*', '*://snowtrace.io/*', '*://optimistic.etherscan.io/*', '*://arbiscan.io/*', @@ -32,7 +31,11 @@ export default defineManifest((env: ConfigEnv) => ({ all_frames: true }, { - matches: ['*://etherscan.io/*', '*://cn.etherscan.com/*'], + matches: [ + '*://etherscan.io/*', + '*://cn.etherscan.com/*', + '*://*.bscscan.com/*' + ], js: ['src/content/etherscan/index.tsx'], all_frames: true }, diff --git a/package.json b/package.json index bae8b60..8f8dd63 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metadock", - "version": "3.4.2", + "version": "3.5.0", "repository": { "type": "git", "url": "https://github.com/blocksecteam/metadock.git" diff --git a/src/assets/icons/icon128.png b/src/assets/icons/icon128.png index 01b589a..d1accfe 100644 Binary files a/src/assets/icons/icon128.png and b/src/assets/icons/icon128.png differ diff --git a/src/assets/icons/icon16.png b/src/assets/icons/icon16.png index 48b82db..26102a1 100644 Binary files a/src/assets/icons/icon16.png and b/src/assets/icons/icon16.png differ diff --git a/src/assets/icons/icon32.png b/src/assets/icons/icon32.png index 684eee6..f27c1de 100644 Binary files a/src/assets/icons/icon32.png and b/src/assets/icons/icon32.png differ diff --git a/src/assets/icons/icon48.png b/src/assets/icons/icon48.png index e5f2691..a2265ed 100644 Binary files a/src/assets/icons/icon48.png and b/src/assets/icons/icon48.png differ diff --git a/src/assets/icons/icon64.png b/src/assets/icons/icon64.png index 428a50a..fbd0400 100644 Binary files a/src/assets/icons/icon64.png and b/src/assets/icons/icon64.png differ diff --git a/src/assets/images/Phalcon.png b/src/assets/images/Phalcon.png index bb76530..bf36eeb 100644 Binary files a/src/assets/images/Phalcon.png and b/src/assets/images/Phalcon.png differ diff --git a/src/assets/images/analyze.png b/src/assets/images/analyze.png index d3d7237..4919d46 100644 Binary files a/src/assets/images/analyze.png and b/src/assets/images/analyze.png differ diff --git a/src/assets/images/logo-circle.png b/src/assets/images/logo-circle.png index 37148cf..b175574 100644 Binary files a/src/assets/images/logo-circle.png and b/src/assets/images/logo-circle.png differ diff --git a/src/assets/images/logo-pure.png b/src/assets/images/logo-pure.png index 01b589a..515cccd 100644 Binary files a/src/assets/images/logo-pure.png and b/src/assets/images/logo-pure.png differ diff --git a/src/assets/images/logo.png b/src/assets/images/logo.png index d8ff463..3a4f211 100644 Binary files a/src/assets/images/logo.png and b/src/assets/images/logo.png differ diff --git a/src/common/constants/support.ts b/src/common/constants/support.ts index d4bac0f..ba0382c 100644 --- a/src/common/constants/support.ts +++ b/src/common/constants/support.ts @@ -332,3 +332,5 @@ export const SIMULATE_SUPPORT_LIST = [ nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 } } ] + +export const TX_EXPLAIN_SUPPORT_LIST = ['eth'] diff --git a/src/common/utils/permission.ts b/src/common/utils/permission.ts index adf535a..0648e1d 100644 --- a/src/common/utils/permission.ts +++ b/src/common/utils/permission.ts @@ -2,7 +2,8 @@ import type { OptWebsite } from '@src/store' import { PHALCON_SUPPORT_LIST, TENDERLY_SUPPORT_LIST, - TRANSACTION_VIEWER_SUPPORT_LIST + TRANSACTION_VIEWER_SUPPORT_LIST, + TX_EXPLAIN_SUPPORT_LIST } from '@common/constants' /** judge from supportWebList */ @@ -41,3 +42,7 @@ export const isSupportSimulator = (chain: string) => { return !!PHALCON_SUPPORT_LIST.find(item => item.chain === chain) ?.supportSimulator } + +export const isSupportTxExplain = (chain: string) => { + return TX_EXPLAIN_SUPPORT_LIST.findIndex(item => item === chain) !== -1 +} diff --git a/src/content/etherscan/components/AlternativeBlockExplorersBtn/index.tsx b/src/content/etherscan/components/AlternativeBlockExplorersBtn/index.tsx index cada45f..78172f5 100644 --- a/src/content/etherscan/components/AlternativeBlockExplorersBtn/index.tsx +++ b/src/content/etherscan/components/AlternativeBlockExplorersBtn/index.tsx @@ -9,14 +9,14 @@ interface Props { const AlternativeBlockExplorersBtn: FC = ({ block }) => { return (
- - Eden Network - - | + {/**/} + {/* Eden Network*/} + {/**/} + {/*|*/} = ({ mainAddress, chain }) => { const toEthervm = () => { const item = ETHERVM_SUPPORT_DIRECT_LIST.find(i => i.chain === chain) if (item) { - window.open(`https://ethervm.io/decompile/${mainAddress}`) + window.open(`${item.url}/${mainAddress}`) } else { window.open('https://ethervm.io/decompile') } diff --git a/src/content/etherscan/components/ModalFundFlowGraph/index.module.less b/src/content/etherscan/components/ModalFundFlowGraph/index.module.less index 042b291..05962fb 100644 --- a/src/content/etherscan/components/ModalFundFlowGraph/index.module.less +++ b/src/content/etherscan/components/ModalFundFlowGraph/index.module.less @@ -205,7 +205,7 @@ right: 8px; bottom: 8px; width: 262px; - height: 57px; + height: 66px; cursor: pointer; img { width: 100%; diff --git a/src/content/etherscan/components/ModalFundFlowGraph/index.tsx b/src/content/etherscan/components/ModalFundFlowGraph/index.tsx index 152445d..3112153 100644 --- a/src/content/etherscan/components/ModalFundFlowGraph/index.tsx +++ b/src/content/etherscan/components/ModalFundFlowGraph/index.tsx @@ -299,7 +299,7 @@ const ModalFundFlowGraph: FC = ({ Try Enhanced Version @@ -536,7 +536,7 @@ const ModalFundFlowGraph: FC = ({ rel="noreferrer" > diff --git a/src/content/etherscan/feat-scripts/index.ts b/src/content/etherscan/feat-scripts/index.ts index cc4a5ca..b387f16 100644 --- a/src/content/etherscan/feat-scripts/index.ts +++ b/src/content/etherscan/feat-scripts/index.ts @@ -22,7 +22,7 @@ export { default as genContractPrivateVariables } from './contract-private-varia export { default as formatWriteContractParams } from './contract-params-format' export { default as genTokenMarketplacesBtn } from './token-marketplaces' export { default as genTxPageAddressLabels } from './tx-address-labels' -export { default as genTransactionSummary } from './transaction-summary' +export { default as genTransactionExplanation } from './transaction-explanation' export { default as genProxyContractLog } from './proxy-contract-log' export { default as genEvmStorageShortcut } from './evm-storage' export * from './transaction-simulator' diff --git a/src/content/etherscan/feat-scripts/transaction-summary.tsx b/src/content/etherscan/feat-scripts/transaction-explanation.tsx similarity index 85% rename from src/content/etherscan/feat-scripts/transaction-summary.tsx rename to src/content/etherscan/feat-scripts/transaction-explanation.tsx index add2b33..135b032 100644 --- a/src/content/etherscan/feat-scripts/transaction-summary.tsx +++ b/src/content/etherscan/feat-scripts/transaction-explanation.tsx @@ -4,7 +4,7 @@ import { createRoot } from 'react-dom/client' import { TransactionExplanation } from '@src/content/etherscan/components' -const genTransactionSummary = async (chain: string) => { +const genTransactionExplanation = async (chain: string) => { const txHash = $('#spanTxHash').text() if (!isHexString(txHash, 32)) return @@ -22,4 +22,4 @@ const genTransactionSummary = async (chain: string) => { ) } -export default genTransactionSummary +export default genTransactionExplanation diff --git a/src/content/etherscan/page-scripts/tx.tsx b/src/content/etherscan/page-scripts/tx.tsx index 5502458..6d182ce 100644 --- a/src/content/etherscan/page-scripts/tx.tsx +++ b/src/content/etherscan/page-scripts/tx.tsx @@ -1,5 +1,5 @@ import { store } from '@src/store' -import { isSupportParsers } from '@common/utils' +import { isSupportParsers, isSupportTxExplain } from '@common/utils' import { SCAN_PAGES } from '@common/constants' import { @@ -9,7 +9,7 @@ import { genTxFortaAlertTip, genCopyIconBtn, genTxPageAddressLabels, - genTransactionSummary + genTransactionExplanation } from '../feat-scripts' const initTxPageScript = async (chain: string) => { @@ -30,7 +30,7 @@ const initTxPageScript = async (chain: string) => { if (txnFortaAlert) genTxFortaAlertTip(chain) if (showCopyIcon) genCopyIconBtn(SCAN_PAGES.TX.name) if (enhancedLabels) genTxPageAddressLabels(chain) - if (txSummary) genTransactionSummary(chain) + if (txSummary && isSupportTxExplain(chain)) genTransactionExplanation(chain) } export default initTxPageScript diff --git a/src/content/scans/components/AlternativeBlockExplorersBtn/index.tsx b/src/content/scans/components/AlternativeBlockExplorersBtn/index.tsx index cada45f..78172f5 100644 --- a/src/content/scans/components/AlternativeBlockExplorersBtn/index.tsx +++ b/src/content/scans/components/AlternativeBlockExplorersBtn/index.tsx @@ -9,14 +9,14 @@ interface Props { const AlternativeBlockExplorersBtn: FC = ({ block }) => { return (
- - Eden Network - - | + {/**/} + {/* Eden Network*/} + {/**/} + {/*|*/}