Skip to content

Commit

Permalink
fix: Correct Solscan link redirect and update Fund Flow button styling
Browse files Browse the repository at this point in the history
  • Loading branch information
0xbe37e committed Oct 7, 2024
1 parent c63f4b1 commit 944c405
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 35 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### v5.4.1

- [fix] Corrected the issue with the Solscan link redirecting to the wrong Phalcon Explorer URL
- [style] Updated the styling of the Solscan Fund Flow button

### v5.4.0

- [feat] Adapt to MantleScan
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": "metasuites",
"version": "5.4.0",
"version": "5.4.1",
"repository": {
"type": "git",
"url": "https://github.com/blocksecteam/metasuites.git"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

.button {
gap: 4px;
border-radius: 6px !important;
background: @phalcon-primary-color !important;
display: flex !important;
.items-center;
Expand Down
63 changes: 35 additions & 28 deletions src/content/solscan/components/PhalconExplorerButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type FC } from 'react'
import { Button } from 'antd'
import { Button, ConfigProvider } from 'antd'

import { PHALCON_EXPLORER_DOMAIN } from '@common/config/uri'

Expand All @@ -15,34 +15,41 @@ const PhalconExplorerButton: FC<Props> = ({ txHash }) => {
}

return (
<Button
size="small"
type="primary"
className={styles.button}
onClick={handleClick}
<ConfigProvider
theme={{
components: {
Button: {
controlHeight: 34,
borderRadius: 8,
fontSize: 12
}
}
}}
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 16 16"
fill="none"
>
<path
d="M4.97136 6.67749C6.45817 5.96519 7.44247 5.62489 8.23283 5.35168C9.34886 4.96626 10.0843 4.71134 11.5736 3.63191C10.8564 3.30625 10.0599 3.12573 9.22201 3.12573C6.56307 3.12573 4.3298 4.94553 3.70044 7.40809C4.1005 7.1361 4.52495 6.89216 4.97258 6.67749H4.97136Z"
fill="white"
/>
<path
d="M14.0362 9.967C13.2702 11.2794 12.2737 12.2454 11.0747 12.8394C10.4759 13.137 9.89773 13.3468 9.30984 13.4822C8.79147 13.6017 8.27676 13.659 7.73643 13.659C7.08267 13.659 6.49722 13.5749 5.93494 13.4834C6.86313 14.1396 7.99744 14.525 9.2208 14.525C12.3688 14.525 14.9204 11.9734 14.9204 8.82536C14.9204 8.59118 14.9058 8.36187 14.879 8.13501C14.6399 8.8034 14.3594 9.41569 14.0374 9.96578L14.0362 9.967Z"
fill="white"
/>
<path
d="M14.996 2C14.9802 2.0183 14.9643 2.03537 14.9485 2.05367C14.3886 2.68181 13.7702 3.25629 13.1067 3.77222C9.65375 6.45922 9.42079 5.66031 5.54459 7.51791C1.40128 9.50358 1 13.4566 1 13.4566C4.85668 10.6111 6.59475 14.0104 10.7954 11.9296C15.2912 9.70238 14.996 2 14.996 2ZM8.9817 11.4136C8.9817 11.4136 7.47293 11.7759 5.50678 11.1087C5.50678 11.1087 4.66641 10.8416 3.99802 10.8416C3.99802 10.8416 4.09803 9.60725 6.97896 8.279C6.97774 8.30949 6.97652 8.33877 6.97652 8.36926C6.97652 9.47187 7.86933 10.3647 8.97194 10.3647C9.99161 10.3647 10.832 9.59993 10.9527 8.61441C10.5258 8.80103 10.0282 8.62417 9.83061 8.20947C9.71961 7.97651 9.72571 7.71672 9.82573 7.49595C9.90745 7.31544 10.0526 7.16054 10.2477 7.06784C10.277 7.0532 10.3075 7.04101 10.3368 7.03125C10.4929 6.97636 10.6454 6.90928 10.7942 6.83732C11.2906 6.59825 11.7687 6.31773 12.231 6.0189C12.7847 5.66153 13.3507 5.23464 13.7739 4.76993C13.7739 4.76993 13.0104 10.6696 8.9817 11.4148V11.4136Z"
fill="white"
/>
</svg>
Phalcon Explorer
</Button>
<Button type="primary" className={styles.button} onClick={handleClick}>
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 16 16"
fill="none"
>
<path
d="M4.97136 6.67749C6.45817 5.96519 7.44247 5.62489 8.23283 5.35168C9.34886 4.96626 10.0843 4.71134 11.5736 3.63191C10.8564 3.30625 10.0599 3.12573 9.22201 3.12573C6.56307 3.12573 4.3298 4.94553 3.70044 7.40809C4.1005 7.1361 4.52495 6.89216 4.97258 6.67749H4.97136Z"
fill="white"
/>
<path
d="M14.0362 9.967C13.2702 11.2794 12.2737 12.2454 11.0747 12.8394C10.4759 13.137 9.89773 13.3468 9.30984 13.4822C8.79147 13.6017 8.27676 13.659 7.73643 13.659C7.08267 13.659 6.49722 13.5749 5.93494 13.4834C6.86313 14.1396 7.99744 14.525 9.2208 14.525C12.3688 14.525 14.9204 11.9734 14.9204 8.82536C14.9204 8.59118 14.9058 8.36187 14.879 8.13501C14.6399 8.8034 14.3594 9.41569 14.0374 9.96578L14.0362 9.967Z"
fill="white"
/>
<path
d="M14.996 2C14.9802 2.0183 14.9643 2.03537 14.9485 2.05367C14.3886 2.68181 13.7702 3.25629 13.1067 3.77222C9.65375 6.45922 9.42079 5.66031 5.54459 7.51791C1.40128 9.50358 1 13.4566 1 13.4566C4.85668 10.6111 6.59475 14.0104 10.7954 11.9296C15.2912 9.70238 14.996 2 14.996 2ZM8.9817 11.4136C8.9817 11.4136 7.47293 11.7759 5.50678 11.1087C5.50678 11.1087 4.66641 10.8416 3.99802 10.8416C3.99802 10.8416 4.09803 9.60725 6.97896 8.279C6.97774 8.30949 6.97652 8.33877 6.97652 8.36926C6.97652 9.47187 7.86933 10.3647 8.97194 10.3647C9.99161 10.3647 10.832 9.59993 10.9527 8.61441C10.5258 8.80103 10.0282 8.62417 9.83061 8.20947C9.71961 7.97651 9.72571 7.71672 9.82573 7.49595C9.90745 7.31544 10.0526 7.16054 10.2477 7.06784C10.277 7.0532 10.3075 7.04101 10.3368 7.03125C10.4929 6.97636 10.6454 6.90928 10.7942 6.83732C11.2906 6.59825 11.7687 6.31773 12.231 6.0189C12.7847 5.66153 13.3507 5.23464 13.7739 4.76993C13.7739 4.76993 13.0104 10.6696 8.9817 11.4148V11.4136Z"
fill="white"
/>
</svg>
Phalcon Explorer
</Button>
</ConfigProvider>
)
}

Expand Down
2 changes: 1 addition & 1 deletion src/content/solscan/feat-scripts/fund-flow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const renderFundFlowButton = async (
mainAddressEl.append(btnRootEl)
const style: CSSProperties = {}
if (isAccountPage) {
style.marginLeft = 16
style.marginLeft = 0
} else {
style.marginTop = 16
}
Expand Down
6 changes: 2 additions & 4 deletions src/content/solscan/feat-scripts/quick2parsers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ const renderAlternativeParsers = async () => {
const container = $(
'#__next > div:nth-of-type(1) > div:nth-of-type(3) > div:nth-of-type(1) > div:nth-of-type(2) > div > div > div:nth-of-type(2) > div > div > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(1)'
)
const txHash = container.text().trim()
const rootEl = $(
'<span id="__metadock-alternative-parsers__" class="inline-flex align-middle" style="margin-left: 8px"></span>'
)
const txHash = container.find('div:first').text().trim()
const rootEl = $('<span id="__metadock-alternative-parsers__"></span>')
container.append(rootEl)

createRoot(rootEl[0]).render(<PhalconExplorerButton txHash={txHash} />)
Expand Down

0 comments on commit 944c405

Please sign in to comment.