Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feat/swap-add' into tmp/20250110
Browse files Browse the repository at this point in the history
  • Loading branch information
dmy147 committed Jan 14, 2025
2 parents 18553c9 + 73892fa commit 8c53b25
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"@rabby-wallet/rabby-action": "0.1.8",
"@rabby-wallet/rabby-api": "0.9.9",
"@rabby-wallet/rabby-security-engine": "2.0.7",
"@rabby-wallet/rabby-swap": "0.0.46-alpha.3",
"@rabby-wallet/rabby-swap": "0.0.46",
"@rabby-wallet/widgets": "1.0.9",
"@rematch/core": "2.2.0",
"@rematch/select": "3.1.2",
Expand Down
9 changes: 7 additions & 2 deletions src/ui/component/TokenSelector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -408,12 +408,17 @@ const TokenSelector = ({
className={clsx(
'flex items-center justify-center gap-6',
'cursor-pointer py-8 px-12 rounded-[8px]',
'bg-r-neutral-card2 hover:bg-r-blue-light1',
'bg-r-neutral-card2 hover:bg-r-blue-light-2',
'text-15 text-r-neutral-title1 font-medium'
)}
onClick={() => onConfirm(token)}
>
<TokenWithChain token={token} width="20px" height="20px" />
<TokenWithChain
token={token}
width="20px"
height="20px"
chainClassName="-top-4 -right-4"
/>

<span>{getTokenSymbol(token)}</span>
</div>
Expand Down
6 changes: 4 additions & 2 deletions src/ui/component/TokenWithChain/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const TokenWithChain = ({
hideChainIcon = false,
isShowChainTooltip = false,
className,
chainClassName,
}: {
token: TokenItem;
width?: string;
Expand All @@ -28,6 +29,7 @@ const TokenWithChain = ({
isShowChainTooltip?: boolean;
className?: string;
chainSize?: string | number;
chainClassName?: string;
}) => {
const chainServerId = token.chain;
const chain = findChain({
Expand Down Expand Up @@ -57,7 +59,7 @@ const TokenWithChain = ({
(isShowChainTooltip ? (
<TooltipWithMagnetArrow
title={chain?.name}
className="rectangle w-[max-content]"
className={clsx('chain-symbol', chainClassName)}
>
<img
className="chain-symbol"
Expand All @@ -67,7 +69,7 @@ const TokenWithChain = ({
</TooltipWithMagnetArrow>
) : (
<img
className="chain-symbol"
className={clsx('chain-symbol', chainClassName)}
style={chainStyle}
src={chain?.logo || IconUnknown}
/>
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4900,10 +4900,10 @@
sha256-uint8array "^0.10.3"
url-parse "^1.5.1"

"@rabby-wallet/[email protected]-alpha.3":
version "0.0.46-alpha.3"
resolved "https://registry.yarnpkg.com/@rabby-wallet/rabby-swap/-/rabby-swap-0.0.46-alpha.3.tgz#ecc683e26f9f075f830c332e9e2dfcafb23a16aa"
integrity sha512-RaDzFDXW35F8KjxCAvks2muokeaG88ZYzFuZfPXEQ2OwJfWhicdCkhDnIUDD/eBDmWAi5mew0GGgB97QD9wlFA==
"@rabby-wallet/[email protected]":
version "0.0.46"
resolved "https://registry.yarnpkg.com/@rabby-wallet/rabby-swap/-/rabby-swap-0.0.46.tgz#f6178166ce7962bf9e287ae56e33fc7b68ff53e1"
integrity sha512-X7bJXA0z2Sdbf6+ectjSsVvGXsFdqZwnTA4V1F18M3FcjgQGo4SWAgT9N3ja/Sm6ew+4ryzk7tvJTwFv/8oISA==
dependencies:
"@ethersproject/abi" "^5.7.0"
axios "^0.27.2"
Expand Down

0 comments on commit 8c53b25

Please sign in to comment.