Skip to content

Commit

Permalink
Merge pull request #55 from XDeFi-tech/feat/update-select-chain-list
Browse files Browse the repository at this point in the history
feat: update select chain list
  • Loading branch information
hinterlist committed Jul 6, 2023
2 parents 09ad7cf + 1d5d582 commit 9920c17
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 49 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xdefi/wallets-connector",
"version": "1.5.14",
"version": "1.5.15",
"description": "Cross chain wallets connector with react hooks",
"author": "garageinc",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,22 @@ import { ReactComponent as BinanceChain } from '../../icons/BinanceChain.svg'
import { ReactComponent as Ethereum } from '../../icons/Ethereum.svg'
import { ReactComponent as Fantom } from '../../icons/Fantom.svg'
import { ReactComponent as Litecoin } from '../../icons/Litecoin.svg'
import { ReactComponent as Near } from '../../icons/Near.svg'
import { ReactComponent as Polygon } from '../../icons/Polygon.svg'
import { ReactComponent as Thor } from '../../icons/Thor.svg'
import { ReactComponent as Osmosis } from '../../icons/Osmosis.svg'
import { ReactComponent as Cosmos } from '../../icons/Cosmos.svg'
import { ReactComponent as Axelar } from '../../icons/Axelar.svg'
import { ReactComponent as Juno } from '../../icons/Juno.svg'
import { ReactComponent as Crescent } from '../../icons/Crescent.svg'
import { ReactComponent as Kava } from '../../icons/Kava.svg'
import { ReactComponent as Stargaze } from '../../icons/Stargaze.svg'
import { ReactComponent as Akash } from '../../icons/Akash.svg'
import { ReactComponent as Cronos } from '../../icons/Cronos.svg'
import { ReactComponent as Kujira } from '../../icons/Kujira.svg'
import { ReactComponent as Stride } from '../../icons/Stride.svg'
import { ReactComponent as Mars } from '../../icons/Mars.svg'
import { ReactComponent as Optimism } from '../../icons/Optimism.svg'
// import { ReactComponent as Near } from '../../icons/Near.svg'
// import { ReactComponent as Kava } from '../../icons/Kava.svg'
// import { ReactComponent as Akash } from '../../icons/Akash.svg'
// import { ReactComponent as Cronos } from '../../icons/Cronos.svg'
// import { ReactComponent as Stride } from '../../icons/Stride.svg'
// import { ReactComponent as Mars } from '../../icons/Mars.svg'

export const CHAIN_OPTIONS = [
{
Expand Down Expand Up @@ -60,6 +61,11 @@ export const CHAIN_OPTIONS = [
value: IChainType.arbitrum,
label: 'Arbitrum'
},
{
icon: <Optimism />,
value: IChainType.optimism,
label: 'Optimism'
},
{
icon: <Aurora />,
value: 'aurora',
Expand All @@ -80,11 +86,6 @@ export const CHAIN_OPTIONS = [
value: IChainType.thorchain,
label: 'Thorchain'
},
{
icon: <Near />,
value: 'near',
label: 'NEAR'
},
{
icon: <Litecoin />,
value: IChainType.litecoin,
Expand Down Expand Up @@ -130,41 +131,46 @@ export const CHAIN_OPTIONS = [
value: IChainType.crescent,
label: 'Crescent'
},
{
icon: <Kava />,
value: IChainType.kava,
label: 'Kava'
},
{
icon: <Stargaze />,
value: IChainType.stargaze,
label: 'Stargaze'
},
{
icon: <Akash />,
value: IChainType.akash,
label: 'Akash'
},
{
icon: <Cronos />,
value: IChainType.cronos,
label: 'Crypto.Org'
},
{
icon: <Kujira />,
value: IChainType.kujira,
label: 'Kujira'
},
{
icon: <Stride />,
value: IChainType.stride,
label: 'Stride'
},
{
icon: <Mars />,
value: IChainType.mars,
label: 'Mars'
}
// {
// icon: <Near />,
// value: 'near',
// label: 'NEAR'
// },
// {
// icon: <Kava />,
// value: IChainType.kava,
// label: 'Kava'
// },
// {
// icon: <Akash />,
// value: IChainType.akash,
// label: 'Akash'
// },
// {
// icon: <Cronos />,
// value: IChainType.cronos,
// label: 'Crypto.Org'
// },
// {
// icon: <Stride />,
// value: IChainType.stride,
// label: 'Stride'
// },
// {
// icon: <Mars />,
// value: IChainType.mars,
// label: 'Mars'
// }
]

export const CHAIN_VALUES = CHAIN_OPTIONS.map((item) => item.value)
4 changes: 4 additions & 0 deletions src/components/icons/Optimism.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 7 additions & 6 deletions src/constants/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export enum IChainType {
binance = 'binance',
binancesmartchain = 'binancesmartchain',
polygon = 'polygon',
optimism = 'optimism',
bitcoin = 'bitcoin',
litecoin = 'litecoin',
bitcoincash = 'bitcoincash',
Expand All @@ -20,13 +21,13 @@ export enum IChainType {
axelar = 'axelar',
juno = 'juno',
crescent = 'crescent',
kava = 'kava',
// kava = 'kava',
stargaze = 'stargaze',
akash = 'akash',
cronos = 'cronos',
kujira = 'kujira',
stride = 'stride',
mars = 'mars'
// akash = 'akash',
// cronos = 'cronos',
kujira = 'kujira'
// stride = 'stride',
// mars = 'mars'
}

export enum WALLETS {
Expand Down
13 changes: 7 additions & 6 deletions src/providers/injected/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,13 +367,13 @@ export const XDEFI: IProviderInfo = {
[IChainType.axelar]: getCosmosTemplate('axelar-dojo-1'),
[IChainType.juno]: getCosmosTemplate('juno-1'),
[IChainType.crescent]: getCosmosTemplate('crescent-1'),
[IChainType.kava]: getCosmosTemplate('kava_2222-10'),
[IChainType.stargaze]: getCosmosTemplate('stargaze-1'),
[IChainType.akash]: getCosmosTemplate('akashnet-2'),
[IChainType.cronos]: getCosmosTemplate('crypto-org-chain-mainnet-1'),
[IChainType.kujira]: getCosmosTemplate('kaiyo-1'),
[IChainType.stride]: getCosmosTemplate('stride-1'),
[IChainType.mars]: getCosmosTemplate('mars-1'),
// [IChainType.kava]: getCosmosTemplate('kava_2222-10'),
// [IChainType.akash]: getCosmosTemplate('akashnet-2'),
// [IChainType.cronos]: getCosmosTemplate('crypto-org-chain-mainnet-1'),
// [IChainType.stride]: getCosmosTemplate('stride-1'),
// [IChainType.mars]: getCosmosTemplate('mars-1'),
[IChainType.binance]: {
methods: {
getAccounts: () => {
Expand Down Expand Up @@ -583,7 +583,8 @@ export const XDEFI: IProviderInfo = {
[IChainType.aurora]: EVM_TEMPLATE,
[IChainType.avalanche]: EVM_TEMPLATE,
[IChainType.polygon]: EVM_TEMPLATE,
[IChainType.fantom]: EVM_TEMPLATE
[IChainType.fantom]: EVM_TEMPLATE,
[IChainType.optimism]: EVM_TEMPLATE
}
}

Expand Down

0 comments on commit 9920c17

Please sign in to comment.