Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update select chain list #55

Merged
merged 1 commit into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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