Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feat/update-swap-bridge' into tm…
Browse files Browse the repository at this point in the history
…p/20240725
  • Loading branch information
dmy147 committed Jul 26, 2024
2 parents 9256334 + 8629a58 commit 64a009f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/ui/views/Swap/Component/QuoteItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ export const DexQuoteItem = (
}

if (!quote?.toTokenAmount) {
bestQuotePercent = (
receiveOrErrorContent = (
<div className="text-r-neutral-foot text-[13px] font-normal">
{t('page.swap.unable-to-fetch-the-price')}
</div>
);
receiveOrErrorContent = null;
bestQuotePercent = null;
disable = true;
}

Expand Down
19 changes: 10 additions & 9 deletions src/ui/views/Swap/Component/ReserveGasPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,13 @@ const ReserveGasContent = (props: ReserveGasContentProps) => {
<div>
<div className={clsx('flex flex-col gap-12')}>
{sortedList?.map((item) => {
const checked = currentSelectedItem === item.level;
const onChecked = () => {
setGasLevel(item);
setCurrentSelectedItem(item.level as any);
};

if (
currentSelectedItem === item.level &&
gasLevel?.level !== currentSelectedItem
) {
if (checked && gasLevel?.level !== currentSelectedItem) {
setGasLevel(item);
}

Expand All @@ -103,7 +101,8 @@ const ReserveGasContent = (props: ReserveGasContentProps) => {
className={clsx(
'flex justify-between',
'py-[22px] px-16 rounded-[8px] cursor-pointer',
'bg-r-neutral-card-1 border border-solid border-transparent hover:border-rabby-blue-default'
'bg-r-neutral-card-1 border border-solid hover:border-rabby-blue-default',
checked ? 'border-rabby-blue-default' : 'border-transparent'
)}
onClick={onChecked}
>
Expand Down Expand Up @@ -136,20 +135,22 @@ const ReserveGasContent = (props: ReserveGasContentProps) => {
</span>
)}
<Checkbox
checked={currentSelectedItem === item.level}
checked={checked}
onChange={onChecked}
background="transparent"
unCheckBackground="transparent"
width="20px"
height="20px"
checkIcon={
currentSelectedItem === item.level ? (
checked ? (
<RcIconCheckedCC
viewBox="0 0 20 20"
className="text-r-blue-default w-20 h-20"
className="text-r-blue-default w-full h-full"
/>
) : (
<RcIconUnCheckedCC
viewBox="0 0 20 20"
className="text-r-neutral-body w-20 h-20"
className="text-r-neutral-body w-full h-full"
/>
)
}
Expand Down

0 comments on commit 64a009f

Please sign in to comment.