diff --git a/public/PriceIdsString.txt b/public/PriceIdsString.txt index 80466414..160ffd66 100644 --- a/public/PriceIdsString.txt +++ b/public/PriceIdsString.txt @@ -1 +1 @@ -secret,akash-network,eris-amplified-luna,andromeda-2,archway,cosmos,agoric,cheqd-network,comdex,composite,polkadot,sentinel,dydx,dymension,eclipse-fi,graviton,harbor-2,chihuahua-token,injective-protocol,inter-stable-token,jackal-protocol,juno-network,kujira,kusama,nolus,unstake-fi,neutron-3,terra-luna-2,levana-protocol,milkyway-staked-tia,mantadao,oraichain-token,osmosis,,picasso,pstake-finance,,quicksilver,kujira,usd-coin,saga-2,stargaze,stride-staked-atom,stride-staked-injective,stride-staked-juno,stkatom,pstake-staked-dydx,stride-staked-luna,stride-staked-osmo,stride,stride-staked-tia,celestia,umee,bitcoin,white-whale,persistence,,alter,amberdao,,fina,shade-protocol,,sienna,silk-bcec1136-561c-4706-a42c-8b67d0d7f7d2,stkd-scrt,usd-coin,axelar,ethereum,wrapped-steth,bitcoin,binancecoin,busd,dai,chainlink,uniswap,tether,frax \ No newline at end of file +secret,akash-network,eris-amplified-luna,andromeda-2,archway,cosmos,agoric,cheqd-network,comdex,composite,polkadot,sentinel,dydx,dymension,eclipse-fi,graviton,harbor-2,chihuahua-token,injective-protocol,inter-stable-token,jackal-protocol,juno-network,kujira,kusama,nolus,unstake-fi,neutron-3,terra-luna-2,levana-protocol,milkyway-staked-tia,mantadao,oraichain-token,osmosis,,picasso,pstake-finance,,quicksilver,kujira,usd-coin,saga-2,stargaze,stride-staked-atom,stride-staked-injective,stride-staked-juno,stkatom,pstake-staked-dydx,stride-staked-luna,stride-staked-osmo,stride,stride-staked-tia,switcheo,celestia,umee,bitcoin,white-whale,persistence,,alter,amberdao,,fina,shade-protocol,,sienna,silk-bcec1136-561c-4706-a42c-8b67d0d7f7d2,stkd-scrt,usd-coin,axelar,ethereum,wrapped-steth,bitcoin,binancecoin,busd,dai,chainlink,uniswap,tether,frax \ No newline at end of file diff --git a/src/components/Wallet/Wallet.tsx b/src/components/Wallet/Wallet.tsx index e59e92c5..85d7c77a 100644 --- a/src/components/Wallet/Wallet.tsx +++ b/src/components/Wallet/Wallet.tsx @@ -137,11 +137,11 @@ function Wallet() { const [isManageViewingkeysModalOpen, setIsManageViewingkeysModalOpen] = useState(false) function handleConnectWallet() { - if (window.keplr && window.getEnigmaUtils && window.getOfflineSignerAuto && window.leap) { + if (window.keplr && window.getEnigmaUtils && window.getOfflineSignerOnlyAmino && window.leap) { setIsConnectWalletModalOpen(true) - } else if (window.keplr && window.getEnigmaUtils && window.getOfflineSignerAuto && !window.leap) { + } else if (window.keplr && window.getEnigmaUtils && window.getOfflineSignerOnlyAmino && !window.leap) { connectWallet('keplr') - } else if (!(window.keplr && window.getEnigmaUtils && window.getOfflineSignerAuto) && window.leap) { + } else if (!(window.keplr && window.getEnigmaUtils && window.getOfflineSignerOnlyAmino) && window.leap) { connectWallet('leap') } else { setIsGetWalletModalOpen(true) diff --git a/src/services/ibc.service.ts b/src/services/ibc.service.ts index d3713bac..cea32b4e 100644 --- a/src/services/ibc.service.ts +++ b/src/services/ibc.service.ts @@ -148,7 +148,7 @@ async function performIbcDeposit( isClassic: false }) - const terraSigner = window.wallet.getOfflineSignerAuto(props.chain.chain_id) + const terraSigner = await window.wallet.getOfflineSignerAuto(props.chain.chain_id) const accounts = await terraSigner.getAccounts() // Create the transaction options with the corrected fee structure @@ -853,7 +853,7 @@ async function getSkipIBCRouting(chain: Chain, IbcMode: IbcMode, token: Token, a } async function getReceiverAddress(chainID: string): Promise { - const wallet = window.wallet.getOfflineSigner(chainID) + const wallet = await window.wallet.getOfflineSignerAuto(chainID) const [{ address: walletAddress }] = await wallet.getAccounts() return walletAddress } diff --git a/src/services/wallet.service.ts b/src/services/wallet.service.ts index 9dec3a1a..0bd2989f 100644 --- a/src/services/wallet.service.ts +++ b/src/services/wallet.service.ts @@ -24,7 +24,7 @@ import { TokenBalances } from 'types/TokenBalances' const connectKeplr = async (lcd: string, chainID: string) => { const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)) - while (!window.keplr || !window.getEnigmaUtils || !window.getOfflineSignerAuto) { + while (!window.keplr || !window.getEnigmaUtils || !window.getOfflineSignerOnlyAmino) { await sleep(50) } @@ -36,7 +36,7 @@ const connectKeplr = async (lcd: string, chainID: string) => { } } - const keplrOfflineSigner = await window.getOfflineSignerAuto(chainID) + const keplrOfflineSigner = window.getOfflineSignerOnlyAmino(chainID) const accounts = await keplrOfflineSigner.getAccounts() const walletAddress = accounts[0].address @@ -44,7 +44,7 @@ const connectKeplr = async (lcd: string, chainID: string) => { const secretjs: SecretNetworkClient = new SecretNetworkClient({ url: lcd, chainId: chainID, - wallet: keplrOfflineSigner as any, + wallet: keplrOfflineSigner, walletAddress, encryptionUtils: window.getEnigmaUtils(chainID) }) @@ -63,13 +63,13 @@ const connectLeap = async (lcd: string, chainID: string) => { // localStorage.setItem("preferedWalletApi", "Fina"); // window.dispatchEvent(new Event("storage")); } else { - while (!window.leap || !window.leap.getEnigmaUtils || !window.leap.getOfflineSignerAuto) { + while (!window.leap || !window.leap.getEnigmaUtils || !window.leap.getOfflineSignerOnlyAmino) { await sleep(50) } await window.leap.enable(chainID) - const wallet = await window.leap.getOfflineSignerAuto(chainID) + const wallet = window.leap.getOfflineSignerOnlyAmino(chainID) const [{ address: walletAddress }] = await wallet.getAccounts() const secretjs: SecretNetworkClient = new SecretNetworkClient({ diff --git a/src/utils/config.ts b/src/utils/config.ts index 3f7a65c7..84769c5d 100644 --- a/src/utils/config.ts +++ b/src/utils/config.ts @@ -109,10 +109,10 @@ export const chains: { [chain_name: string]: Chain } = { }, Carbon: { chain_name: 'Carbon', - deposit_channel_id: 'channel-XX', + deposit_channel_id: 'channel-40', deposit_gas: 200_000, - deposit_gas_denom: 'dswth', - withdraw_channel_id: 'channel-XX', + deposit_gas_denom: 'swth', + withdraw_channel_id: 'channel-157', withdraw_gas: 150_000, chain_id: 'carbon-1', bech32_prefix: 'swth', @@ -604,6 +604,18 @@ export const tokens: Token[] = [ 'uscrt' ) }, + { + chain_name: 'Carbon', + denom: ibcDenom( + [ + { + incomingChannelId: chains['Carbon'].deposit_channel_id, + incomingPortId: 'transfer' + } + ], + 'uscrt' + ) + }, { chain_name: 'Celestia', denom: ibcDenom( @@ -944,6 +956,10 @@ export const tokens: Token[] = [ chain_name: 'Axelar', denom: 'uscrt' }, + { + chain_name: 'Carbon', + denom: 'uscrt' + }, { chain_name: 'Celestia', denom: 'uscrt' @@ -2723,6 +2739,35 @@ export const tokens: Token[] = [ } ] }, + { + name: 'SWTH', + description: 'Carbon Governance Token', + address: 'secret187ehv3mquvfxwnwaff90c6keq0qf66hljw5xzt', + code_hash: '638a3e1d50175fbcb8373cf801565283e3eb23d88a9b7b7f99fcc5eb1e6b561e', + image: '/swth.svg', + decimals: 8, + coingecko_id: 'switcheo', + deposits: [ + { + chain_name: 'Carbon', + denom: 'swth' + } + ], + withdrawals: [ + { + chain_name: 'Carbon', + denom: ibcDenom( + [ + { + incomingChannelId: chains['Carbon'].withdraw_channel_id, + incomingPortId: 'transfer' + } + ], + 'swth' + ) + } + ] + }, { name: 'TIA', description: 'Celestia Governance Token',