Skip to content

Commit

Permalink
feat: Replace logo, and adapt to new appearance of BNB Chain
Browse files Browse the repository at this point in the history
  • Loading branch information
0xbe37e committed Aug 15, 2023
1 parent 35f6039 commit 722e478
Show file tree
Hide file tree
Showing 23 changed files with 45 additions and 30 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 5 additions & 2 deletions manifest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export default defineManifest((env: ConfigEnv) => ({
{
matches: [
'*://polygonscan.com/*',
'*://*.bscscan.com/*',
'*://snowtrace.io/*',
'*://optimistic.etherscan.io/*',
'*://arbiscan.io/*',
Expand All @@ -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
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "metadock",
"version": "3.4.2",
"version": "3.5.0",
"repository": {
"type": "git",
"url": "https://github.com/blocksecteam/metadock.git"
Expand Down
Binary file modified src/assets/icons/icon128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/icons/icon16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/icons/icon32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/icons/icon48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/icons/icon64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/Phalcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/analyze.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/logo-circle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/logo-pure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/common/constants/support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,3 +332,5 @@ export const SIMULATE_SUPPORT_LIST = [
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }
}
]

export const TX_EXPLAIN_SUPPORT_LIST = ['eth']
7 changes: 6 additions & 1 deletion src/common/utils/permission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ interface Props {
const AlternativeBlockExplorersBtn: FC<Props> = ({ block }) => {
return (
<div className={styles.alternativeBlockExplorersBtn}>
<a
href={`https://explorer.edennetwork.io/block/${block}/`}
target="_blank"
rel="noopener noreferrer"
>
Eden Network
</a>
<span className={styles.divider}>|</span>
{/*<a*/}
{/* href={`https://explorer.edennetwork.io/block/${block}/`}*/}
{/* target="_blank"*/}
{/* rel="noopener noreferrer"*/}
{/*>*/}
{/* Eden Network*/}
{/*</a>*/}
{/*<span className={styles.divider}>|</span>*/}
<a
href={`https://flashbots-explorer.marto.lol/?block=${block}`}
target="_blank"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const DecompileInEthervmBtn: FC<Props> = ({ 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')
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
right: 8px;
bottom: 8px;
width: 262px;
height: 57px;
height: 66px;
cursor: pointer;
img {
width: 100%;
Expand Down
4 changes: 2 additions & 2 deletions src/content/etherscan/components/ModalFundFlowGraph/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ const ModalFundFlowGraph: FC<Props> = ({
<img
className="me-1"
style={{ width: '18px' }}
src="https://assets.blocksec.com/image/1677135239463-4.png"
src="https://assets.blocksec.com/image/1692101500475-3.png"
alt=""
/>
Try Enhanced Version
Expand Down Expand Up @@ -536,7 +536,7 @@ const ModalFundFlowGraph: FC<Props> = ({
rel="noreferrer"
>
<img
src="https://assets.blocksec.com/image/1669950517632-2.png"
src="https://assets.blocksec.com/image/1692101500475-4.png"
alt=""
/>
</a>
Expand Down
2 changes: 1 addition & 1 deletion src/content/etherscan/feat-scripts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -22,4 +22,4 @@ const genTransactionSummary = async (chain: string) => {
)
}

export default genTransactionSummary
export default genTransactionExplanation
6 changes: 3 additions & 3 deletions src/content/etherscan/page-scripts/tx.tsx
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -9,7 +9,7 @@ import {
genTxFortaAlertTip,
genCopyIconBtn,
genTxPageAddressLabels,
genTransactionSummary
genTransactionExplanation
} from '../feat-scripts'

const initTxPageScript = async (chain: string) => {
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ interface Props {
const AlternativeBlockExplorersBtn: FC<Props> = ({ block }) => {
return (
<div className={styles.alternativeBlockExplorersBtn}>
<a
href={`https://explorer.edennetwork.io/block/${block}/`}
target="_blank"
rel="noopener noreferrer"
>
Eden Network
</a>
<span className={styles.divider}>|</span>
{/*<a*/}
{/* href={`https://explorer.edennetwork.io/block/${block}/`}*/}
{/* target="_blank"*/}
{/* rel="noopener noreferrer"*/}
{/*>*/}
{/* Eden Network*/}
{/*</a>*/}
{/*<span className={styles.divider}>|</span>*/}
<a
href={`https://flashbots-explorer.marto.lol/?block=${block}`}
target="_blank"
Expand Down

0 comments on commit 722e478

Please sign in to comment.