Skip to content

Commit

Permalink
fix: Fixed some style issues and tag display bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
0xbe37e committed May 1, 2023
1 parent 50903e0 commit 8ee48c5
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 7 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Whenever you change dependencies (adding, removing, or updating, either in `pack
- [x] Show private variables
- [x] Quick format parameters
- [x] Show nft marketplaces
- [x] Show proxy upgrade log
- [ ] Show token marketplaces
- [ ] Sandwich Attack Risk Detection

Expand All @@ -104,6 +105,14 @@ Whenever you change dependencies (adding, removing, or updating, either in `pack

## Changelog

### v2.4.2

- [fix] Fixed some style issues and tag display bugs.

### v2.4.1

- [feat] Proxy logs now support several other EVM chains.

### v2.4.0

- [feat] Add proxy log on Etherscan and Bscscan
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": "2.4.1",
"version": "2.4.2",
"repository": {
"type": "git",
"url": "https://github.com/blocksecteam/metadock.git"
Expand Down
12 changes: 9 additions & 3 deletions src/content/etherscan/feat-scripts/tx-address-label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,15 @@ const genTxPageAddressLabel = async (chain: string) => {
if (isFromTo && (match || !isAddress(text))) return
// ======

const address = pickAddress(el.attr('href')!)
const address = pickAddress(el.attr('href')!)?.toLowerCase()
if (address) {
const tooltip = el.find("*[data-bs-toggle='tooltip']")
if (tooltip.length) {
el.addClass('center')
el.css({
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
})
}

if (!addressList.includes(address)) {
Expand All @@ -59,7 +63,9 @@ const genTxPageAddressLabel = async (chain: string) => {
const resultLabels: AddressLabel[] = res.data
resultLabels.forEach(item => {
tagsList.forEach(el => {
const address = pickAddress(el.getAttribute('href') ?? '')
const address = pickAddress(
el.getAttribute('href') ?? ''
)?.toLowerCase()
if (item.address === address) {
if (isFromToAddress(el)) {
$(el).text(item.address)
Expand Down
12 changes: 9 additions & 3 deletions src/content/scans/feat-scripts/tx-address-label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ const genTxPageAddressLabel = async (chain: string) => {
// === Do not process elements that are already labeled ===
if (!el.text().startsWith('0x')) return
// ======
const address = pickAddress(el.attr('href')!)
const address = pickAddress(el.attr('href')!)?.toLowerCase()
if (address) {
const tooltip = el.find("*[data-bs-toggle='tooltip']")
if (tooltip.length) {
el.addClass('center')
el.css({
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
})
}

if (!addressList.includes(address)) {
Expand Down Expand Up @@ -60,7 +64,9 @@ const genTxPageAddressLabel = async (chain: string) => {
const resultLabels: AddressLabel[] = res.data
resultLabels.forEach(item => {
tagsList.forEach(el => {
const address = pickAddress(el.getAttribute('href') ?? '')
const address = pickAddress(
el.getAttribute('href') ?? ''
)?.toLowerCase()

if (item.address === address) {
const id = el.getAttribute('id')
Expand Down
1 change: 1 addition & 0 deletions src/popup/App.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
width: 400px;
height: 600px;
overflow: overlay;
background-color: #ffffff;
}

0 comments on commit 8ee48c5

Please sign in to comment.