Skip to content

Commit

Permalink
Merge pull request #11 from oraichain/feat/ibc-wasm
Browse files Browse the repository at this point in the history
pumb ibc wasm homebase
  • Loading branch information
haunv3 authored Aug 9, 2024
2 parents 08f5154 + faeb216 commit b9c626c
Show file tree
Hide file tree
Showing 8 changed files with 369 additions and 382 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@oraichain/orai-bitcoin": "^1.0.7",
"@oraichain/oraidex-common-ui": "1.0.11",
"@oraichain/oraidex-contracts-sdk": "^1.0.26",
"@oraichain/oraidex-universal-swap": "^1.0.49",
"@oraichain/oraidex-universal-swap": "1.0.97",
"@reduxjs/toolkit": "^1.9.3",
"@sentry/react": "^7.47.0",
"@tanstack/react-query": "^4.32.6",
Expand Down Expand Up @@ -115,7 +115,8 @@
},
"resolutions": {
"bech32": "1.1.4",
"bitcoinjs-lib": "5.2.0"
"bitcoinjs-lib": "5.2.0",
"axios": "0.26.1"
},
"engines": {
"node": "^18 || ^20"
Expand Down
1 change: 1 addition & 0 deletions src/assets/icons/celestia.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions src/assets/icons/ton.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 31 additions & 11 deletions src/config/chainInfos.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @ts-nocheck
import {
TokenItemType,
tokens,
Expand Down Expand Up @@ -33,6 +32,8 @@ import { ReactComponent as TimpiIcon } from 'assets/icons/timpiIcon.svg';
import { ReactComponent as NeutaroIcon } from 'assets/icons/neutaro.svg';
import { ReactComponent as OrchaiIcon } from 'assets/icons/orchaiIcon.svg';
import { ReactComponent as BitcoinIcon } from 'assets/icons/bitcoin.svg';
import { ReactComponent as CelestiaIcon } from 'assets/icons/celestia.svg';
import { ReactComponent as TonIcon } from 'assets/icons/ton.svg';

import {
AIRI_BSC_CONTRACT,
Expand Down Expand Up @@ -75,7 +76,8 @@ import {
NEUTARO_ORAICHAIN_DENOM,
OCH_CONTRACT,
OCH_ETH_CONTRACT,
ORAIX_ETH_CONTRACT
ORAIX_ETH_CONTRACT,
TON_ORAICHAIN_DENOM
} from '@oraichain/oraidex-common';
import { BridgeAppCurrency, CustomChainInfo, defaultBech32Config } from '@oraichain/oraidex-common';
import { flatten } from 'lodash';
Expand All @@ -88,10 +90,10 @@ type ChainIcon = Pick<CustomChainInfo, 'chainId' | 'Icon' | 'IconLight'>;
export const bitcoinMainnet: CustomChainInfo = {
rest: 'https://blockstream.info/api',
rpc: 'https://blockstream.info/api',
chainId: ChainIdEnum.Bitcoin,
chainName: 'Bitcoin',
chainId: ChainIdEnum.Bitcoin as any,
chainName: 'Bitcoin' as any,
bip44: {
coinType: 0
coinType: 0 as any
},
coinType: 0,
Icon: BTCIcon,
Expand All @@ -104,12 +106,12 @@ export const bitcoinMainnet: CustomChainInfo = {
coinImageUrl: 'https://assets.coingecko.com/coins/images/1/small/bitcoin.png'
},
bech32Config: defaultBech32Config('bc'),
networkType: 'bitcoin',
networkType: 'bitcoin' as any,
currencies: [
{
coinDenom: 'BTC',
coinMinimalDenom: 'btc',
coinDecimals: 8,
coinDecimals: 8 as any,
bridgeTo: ['Oraichain'],
prefixToken: 'oraibtc',
Icon: BTCIcon,
Expand Down Expand Up @@ -238,6 +240,16 @@ export const tokensIcon: TokenIcon[] = [
coinGeckoId: 'bitcoin',
Icon: BitcoinIcon,
IconLight: BitcoinIcon
},
{
coinGeckoId: 'celestia',
Icon: CelestiaIcon,
IconLight: CelestiaIcon
},
{
coinGeckoId: 'the-open-network',
Icon: TonIcon,
IconLight: TonIcon
}
];

Expand Down Expand Up @@ -313,6 +325,7 @@ export const mapListWithIcon = (list: any[], listIcon: ChainIcon[] | TokenIcon[]
let Icon = OraiIcon;
let IconLight = OraiLightIcon;

//@ts-ignore
const findedItem = listIcon.find((icon) => icon[key] === item[key]);
if (findedItem) {
Icon = findedItem.Icon;
Expand Down Expand Up @@ -597,6 +610,13 @@ export const oraichainNetwork: CustomChainInfo = {
Icon: BTCIcon,
IconLight: BTCIcon,
coinImageUrl: 'https://s2.coinmarketcap.com/static/img/coins/64x64/1.png'
},
{
coinDenom: 'TON',
coinMinimalDenom: TON_ORAICHAIN_DENOM,
coinDecimals: 9,
coinGeckoId: 'the-open-network',
coinImageUrl: 'https://assets.coingecko.com/coins/images/17980/standard/ton_symbol.png?1696517498'
}
// {
// coinDenom: 'ATOM-CW20',
Expand Down Expand Up @@ -889,8 +909,8 @@ export const chainInfos: CustomChainInfo[] = [
{
rpc: 'https://btc.rpc.orai.io',
rest: 'https://btc.lcd.orai.io/',
chainId: 'oraibtc-mainnet-1',
chainName: 'OraiBTC',
chainId: 'oraibtc-mainnet-1' as any,
chainName: 'OraiBTC' as any,
networkType: 'cosmos',
bip44: {
coinType: 118
Expand Down Expand Up @@ -947,7 +967,7 @@ export const chainInfos: CustomChainInfo[] = [
]
},
{
rpc: 'https://rpc.mainnet.noble.strange.love/',
rpc: 'https://noble-rpc.polkachu.com/',
rest: 'https://noble-api.polkachu.com',
chainId: 'noble-1',
chainName: 'Noble',
Expand Down Expand Up @@ -1309,4 +1329,4 @@ export const evmChains = chainInfos.filter(
(c) => c.networkType === 'evm' && c.bip44.coinType === 60 && c.chainId !== '0x1ae6'
);

export const btcChains = chainInfos.filter((c) => c.networkType === 'bitcoin');
export const btcChains = chainInfos.filter((c) => c.networkType === ('bitcoin' as any));
Loading

0 comments on commit b9c626c

Please sign in to comment.