Skip to content

Commit

Permalink
fix: select
Browse files Browse the repository at this point in the history
  • Loading branch information
quangdz1704 committed Sep 26, 2024
1 parent cae52d5 commit 42d9525
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
17 changes: 17 additions & 0 deletions src/pages/Pool-V3/components/BannerNoticePool/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,23 @@ const BannerNoticePool = () => {
<Link to={url}>Add LP Now!</Link> 🚀
</span>
</div>

{/*
<div className="sc-f636c9bb-0 ipvWEv">
<svg>
<circle r="9" cx="10" cy="10"></circle>
<circle r="9" cx="10" cy="10" style={{stroke-dashoffset: 103.385}}></circle>
</svg>
<svg
viewBox="0 0 24 24"
color="primary"
width="20px"
xmlns="http://www.w3.org/2000/svg"
className="sc-df97f1b-0 egdMRr"
>
<path d="M5 13H16.17L11.29 17.88C10.9 18.27 10.9 18.91 11.29 19.3C11.68 19.69 12.31 19.69 12.7 19.3L19.29 12.71C19.68 12.32 19.68 11.69 19.29 11.3L12.71 4.7C12.32 4.31 11.69 4.31 11.3 4.7C10.91 5.09 10.91 5.72 11.3 6.11L16.17 11H5C4.45 11 4 11.45 4 12C4 12.55 4.45 13 5 13Z"></path>
</svg>
</div> */}
</div>

<div className={styles.close} onClick={() => setOpen(false)}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomChainInfo, TokenItemType, truncDecimals } from '@oraichain/oraidex-common';
import { CustomChainInfo, TokenItemType, truncDecimals, HMSTR_ORAICHAIN_DENOM } from '@oraichain/oraidex-common';
import { ReactComponent as IconoirCancel } from 'assets/icons/iconoir_cancel.svg';
import { ReactComponent as NoResultDark } from 'assets/images/no-result-dark.svg';
import { ReactComponent as NoResultLight } from 'assets/images/no-result.svg';
Expand Down Expand Up @@ -152,6 +152,13 @@ export default function SelectToken({
const balanceDelta = Number(b.usd) - Number(a.usd);

if (!balanceDelta) {
if (a.denom === HMSTR_ORAICHAIN_DENOM && b.denom !== HMSTR_ORAICHAIN_DENOM) {
return -1; // Push PepePoolKey elements to the top
}
if (a.denom !== HMSTR_ORAICHAIN_DENOM && b.denom === HMSTR_ORAICHAIN_DENOM) {
return 1; // Keep non-'a' elements below 'a'
}

return (tokenRank[b.coinGeckoId] || 0) - (tokenRank[a.coinGeckoId] || 0);
}
return balanceDelta;
Expand Down

0 comments on commit 42d9525

Please sign in to comment.