Skip to content

Commit

Permalink
update: check pair swap equal
Browse files Browse the repository at this point in the history
  • Loading branch information
haunv3 committed Dec 6, 2023
1 parent 38e9034 commit 375e8ea
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@oraichain/kawaiiverse-txs": "^0.0.3",
"@oraichain/oraidex-common-ui": "^1.0.3",
"@oraichain/oraidex-contracts-sdk": "^1.0.26",
"@oraichain/oraidex-universal-swap": "^1.0.34",
"@oraichain/oraidex-universal-swap": "^1.0.35",
"@reduxjs/toolkit": "^1.9.3",
"@sentry/react": "^7.47.0",
"@tanstack/react-query": "^4.32.6",
Expand Down
7 changes: 7 additions & 0 deletions src/pages/UniversalSwap/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,13 @@ export const generateNewSymbol = (
if (isFromTokenEqualToToken) {
const symbol = fromTokenIsOrai ? 'USDT' : 'ORAI';
findedPair = PAIRS_CHART.find((p) => p.symbol.includes(fromToken.name) && p.symbol.includes(symbol));
if (!findedPair)
return {
...newTVPair,
symbol: `${fromToken.name}/${toToken.name}`,
info: ''
};

newTVPair.symbol = findedPair.symbol;
newTVPair.info = findedPair.info;
return newTVPair;
Expand Down
14 changes: 7 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2917,9 +2917,9 @@
react-use "^17.4.0"

"@oraichain/oraidex-common@^1.0.44":
version "1.0.44"
resolved "https://registry.yarnpkg.com/@oraichain/oraidex-common/-/oraidex-common-1.0.44.tgz#88990da6104af1b0013a5746340915265f9b7eea"
integrity sha512-/bgbf0KcMWANms/ZaEc8KESAy9/UACPzgeGcGGXGhnIMsrvHOMc3a6EQpY40B4xqp/8Cs+up4Gww4o9DLNRj6g==
version "1.0.45"
resolved "https://registry.yarnpkg.com/@oraichain/oraidex-common/-/oraidex-common-1.0.45.tgz#15ba8962e25e99ad0b3f5376f0a2d9ed87ae06e4"
integrity sha512-aaNXqWndvajzBN8rQXgyyi371D3GbDpYbg4ivvo6t2DkPJb5EfI8xYit0wHTfbjWHgRFdjUaJ24NzmaKpfBPpg==
dependencies:
"@ethersproject/providers" "^5.0.10"
"@keplr-wallet/types" "^0.11.38"
Expand All @@ -2940,10 +2940,10 @@
resolved "https://registry.yarnpkg.com/@oraichain/oraidex-contracts-sdk/-/oraidex-contracts-sdk-1.0.26.tgz#83c4c80185396a9c62d7ced4437bef7b178e0c37"
integrity sha512-Uai30rSSn7h46lBLFuVbW96ErXAWRxfvEP+CNm/TXyGIw8VRtTaebQAqldsbxzYwBVEYbwDwZMHRGQWrsJBkJg==

"@oraichain/oraidex-universal-swap@^1.0.34":
version "1.0.34"
resolved "https://registry.yarnpkg.com/@oraichain/oraidex-universal-swap/-/oraidex-universal-swap-1.0.34.tgz#535eb6a22238408c15ba5d5835e07a2219534070"
integrity sha512-j8Wz/hgle8Rgmve9OKO970l0HlXfVUoSgyI6HFgLAVoORPsTI7tH2rXxFRTZpLHb/7gQ7BN2R1U9u1ucJiTtXw==
"@oraichain/oraidex-universal-swap@^1.0.35":
version "1.0.35"
resolved "https://registry.yarnpkg.com/@oraichain/oraidex-universal-swap/-/oraidex-universal-swap-1.0.35.tgz#4c4ae8cd1b1138b6f50887dbf3616f1dddf64c99"
integrity sha512-7zjkpCfQoQInoS5L4GcIADQWFrh348QfTN+Eckc75akuUllIClMwOBC5i1VuCHqYlXplRO7qjId0n9aUICYTwQ==
dependencies:
"@oraichain/oraidex-common" "^1.0.44"
"@oraichain/oraidex-contracts-sdk" "^1.0.24"
Expand Down

0 comments on commit 375e8ea

Please sign in to comment.