Skip to content

Commit

Permalink
Merge pull request #1057 from oraidex/feat/add-solana
Browse files Browse the repository at this point in the history
Feat/add solana
  • Loading branch information
haunv3 authored Nov 30, 2024
2 parents c6d4a25 + e329a6e commit e2fef8c
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
"bitcoinjs-lib": "5.2.0",
"axios": "0.26.1",
"@sentry/react": "7.99.0",
"@oraichain/oraidex-common": "1.1.32"
"@oraichain/oraidex-common": "1.1.34"
},
"engines": {
"node": "^18 || ^20"
Expand Down
1 change: 1 addition & 0 deletions src/assets/icons/solana.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/config/iconInfos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import PepeIcon from 'assets/icons/pepe.svg?react';
import CatIcon from 'assets/icons/icon-simoncat.svg?react';
import HmstrIcon from 'assets/icons/hmstr.svg?react';
import DogecoinIcon from 'assets/icons/dogecoin.svg?react';
import SolanaIcon from 'assets/icons/solana.svg?react';
import { CustomChainInfo, TokenItemType } from '@oraichain/oraidex-common';
import { bitcoinChainId } from 'helper/constants';

Expand Down Expand Up @@ -169,6 +170,11 @@ export const tokensIconInfos: TokenIcon[] = [
coinGeckoId: 'dogecoin',
Icon: DogecoinIcon,
IconLight: DogecoinIcon
},
{
coinGeckoId: 'solana',
Icon: SolanaIcon,
IconLight: SolanaIcon
}
];

Expand Down
1 change: 1 addition & 0 deletions src/hooks/useLoadTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ async function loadBtcEntries(
}

async function loadEvmAmounts(dispatch: Dispatch, evmAddress: string, chains: CustomChainInfo[]) {
console.log('---', chains);
const amountDetails = Object.fromEntries(
flatten(await Promise.all(chains.map((chain) => loadEvmEntries(evmAddress, chain))))
);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Balance/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ import { MsgTransfer } from 'cosmjs-types/ibc/applications/transfer/v1/tx';
import { MsgTransfer as MsgTransferInjective } from '@injectivelabs/sdk-ts/node_modules/cosmjs-types/ibc/applications/transfer/v1/tx';
import { collectWallet, connectWithSigner, getCosmWasmClient } from 'libs/cosmjs';

interface BalanceProps {}
interface BalanceProps { }

export const isMaintainBridge = false;

Expand Down
12 changes: 6 additions & 6 deletions src/pages/UniversalSwap/Component/AssetsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ export const AssetsTab: FC<{ networkFilter: string }> = ({ networkFilter }) => {
label?: string;
balance?: number | string;
}[] = [
{
src: WalletIcon,
label: 'Total balance',
balance: formatDisplayUsdt(totalUsd)
}
];
{
src: WalletIcon,
label: 'Total balance',
balance: formatDisplayUsdt(totalUsd)
}
];

if (!networkFilter || networkFilter === 'Oraichain') {
listAsset = [
Expand Down
39 changes: 32 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3341,10 +3341,10 @@
react-use "^17.4.0"
react-use-websocket "^4.5.0"

"@oraichain/[email protected].32", "@oraichain/oraidex-common@^1.1.27", "@oraichain/oraidex-common@^1.1.32":
version "1.1.32"
resolved "https://registry.yarnpkg.com/@oraichain/oraidex-common/-/oraidex-common-1.1.32.tgz#c787dc3451584ffccd63a20bb230a5dd0a2e383f"
integrity sha512-8DbfumZ26fKFN1yhiQbJOSoXdqHuoU3i2JvVLpSOtveYUd1Z5rBDs3XVS7odNcUAgF0osqzq5sg9+4yUzruZ8Q==
"@oraichain/[email protected].34", "@oraichain/oraidex-common@^1.1.27", "@oraichain/oraidex-common@^1.1.32":
version "1.1.34"
resolved "https://registry.yarnpkg.com/@oraichain/oraidex-common/-/oraidex-common-1.1.34.tgz#257d25408450c438dc2bf0870fa8de9125af92ed"
integrity sha512-3PzjIS7+QlhSl/5w1NDXr5hZ8LXgJP0IqMWK/ZwJNM7yySeWRui6pwzFwariW2AQ/raU/z1Umr1Bh13idfeQ4Q==
dependencies:
"@cosmjs/amino" "^0.32.4"
"@cosmjs/cosmwasm-stargate" "^0.32.4"
Expand Down Expand Up @@ -13496,7 +13496,7 @@ string-env-interpolation@^1.0.1:
resolved "https://registry.yarnpkg.com/string-env-interpolation/-/string-env-interpolation-1.0.1.tgz#ad4397ae4ac53fe6c91d1402ad6f6a52862c7152"
integrity sha512-78lwMoCcn0nNu8LszbP1UA7g55OeE4v7rCeWnM5B453rnNr4aq+5it3FEYtZrSEiMvHZOZ9Jlqb0OD0M2VInqg==

"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand All @@ -13514,6 +13514,15 @@ string-width@^3.0.0, string-width@^3.1.0:
is-fullwidth-code-point "^2.0.0"
strip-ansi "^5.1.0"

string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@^5.0.1, string-width@^5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794"
Expand Down Expand Up @@ -13542,7 +13551,7 @@ string_decoder@~1.1.1:
dependencies:
safe-buffer "~5.1.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand All @@ -13563,6 +13572,13 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0:
dependencies:
ansi-regex "^4.1.0"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^7.0.1:
version "7.1.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
Expand Down Expand Up @@ -14741,7 +14757,7 @@ wordwrapjs@^5.1.0:
resolved "https://registry.yarnpkg.com/wordwrapjs/-/wordwrapjs-5.1.0.tgz#4c4d20446dcc670b14fa115ef4f8fd9947af2b3a"
integrity sha512-JNjcULU2e4KJwUNv6CHgI46UvDGitb6dGryHajXTDiLgg1/RiGoPSDw4kZfYnwGtEXf2ZMeIewDQgFGzkCB2Sg==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -14768,6 +14784,15 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down

0 comments on commit e2fef8c

Please sign in to comment.