Skip to content

Commit

Permalink
fix: custom rpc tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
cs1707 committed Sep 2, 2024
1 parent c9892ae commit 9616c18
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/ui/component/ChainIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const ChainIcon = ({
showCustomRPCToolTip = false,
nonce,
innerClassName,
tooltipTriggerElement = 'chain',
tooltipTriggerElement = 'dot',
tooltipProps,
}: Props) => {
const wallet = useWallet();
Expand Down Expand Up @@ -197,7 +197,7 @@ const ChainIcon = ({
);
} else {
return (
<div className="chain-icon-comp">
<div className="chain-icon-comp relative">
<Tooltip
placement="top"
overlayClassName={clsx('rectangle')}
Expand All @@ -213,7 +213,7 @@ const ChainIcon = ({
/>
</ChainIconWrapper>
</Tooltip>
<Tooltip
<TooltipWithMagnetArrow
placement="top"
overlayClassName={clsx('rectangle')}
{...tooltipProps}
Expand All @@ -233,7 +233,7 @@ const ChainIcon = ({
) : (
<UnavaliableIcon className={clsx(size)} />
))}
</Tooltip>
</TooltipWithMagnetArrow>
</div>
);
}
Expand Down
6 changes: 4 additions & 2 deletions src/ui/component/ChainSelector/InForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import { SWAP_SUPPORT_CHAINS } from '@/constant';
import { findChain } from '@/utils/chain';

const ChainWrapper = styled.div`
height: 40px;
/* height: 40px; */
background: var(--r-neutral-card-2, #f2f4f7);
border-radius: 6px;
padding: 12px 10px;
padding: 12px 12px;
width: 100%;
display: flex;
align-items: center;
Expand All @@ -39,6 +39,7 @@ const ChainWrapper = styled.div`
}
.name {
color: var(--r-neutral-title-1, #192945);
line-height: 15px;
}
}
`;
Expand Down Expand Up @@ -155,6 +156,7 @@ export default function ChainSelectorInForm({
supportChains={supportChains}
disabledTips={disabledTips}
title={title}
showRPCStatus
/>
)}
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ export const SelectChainItem = forwardRef(
? customRPC[data.enum].url
: ''
}
showCustomRPCToolTip
/>
) : (
<img
Expand Down
1 change: 1 addition & 0 deletions src/ui/views/Approval/components/AddAsset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ const AddAsset = ({ params }: { params: AddAssetProps }) => {
onChange={handleChainChanged}
onCancel={() => rejectApproval('User rejected the request.')}
disabledTips={t('page.addToken.noTokenFoundOnThisChain')}
showRPCStatus
/>
</div>
</AddAssetWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ export const AddCustomTokenPopup = ({ visible, onClose, onConfirm }: Props) => {
hideTestnetTab
hideMainnetTab={false}
visible={chainSelectorState.visible}
showRPCStatus
onCancel={() => {
setChainSelectorState({
visible: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ export const AddCustomTestnetTokenPopup = ({
visible: false,
});
}}
showRPCStatus
onChange={(value) => {
setChainSelectorState({
visible: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ export default ({
className="receive-chain-select-modal"
value={CHAINS_ENUM.ETH}
visible={isShowReceiveModal}
showRPCStatus
onChange={(chain) => {
history.push(`/receive?rbisource=dashboard&chain=${chain}`);
setIsShowReceiveModal(false);
Expand Down

0 comments on commit 9616c18

Please sign in to comment.