From bc5569c4c919080ef7f04f31ded579abea207270 Mon Sep 17 00:00:00 2001 From: aleka Date: Mon, 16 Oct 2023 17:26:29 -0400 Subject: [PATCH] testnet4 followup, switch offline msg (#75) --- src/constants/wallets.ts | 21 +++++++++++++-------- src/hooks/useSelectedNetwork.ts | 2 +- src/views/dialogs/ExchangeOfflineDialog.tsx | 2 +- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/constants/wallets.ts b/src/constants/wallets.ts index efb4077..2d76b03 100644 --- a/src/constants/wallets.ts +++ b/src/constants/wallets.ts @@ -287,10 +287,10 @@ export type DydxAddress = `dydx${string}`; export const DYDX_CHAIN_INFO: Parameters[0] = { rpc: 'https://dydx-testnet-archive.allthatnode.com:26657', rest: 'https://dydx-testnet-archive.allthatnode.com:1317', - chainId: 'dydx-testnet-3', + chainId: 'dydx-testnet-4', chainName: 'dYdX Public Testnet', chainSymbolImageUrl: - 'https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/dydx-testnet-3/chain.png', + 'https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/dydx-testnet-4/chain.png', bech32Config: { bech32PrefixAccPub: 'dydxpub', bech32PrefixValPub: 'dydxvaloperpub', @@ -304,26 +304,31 @@ export const DYDX_CHAIN_INFO: Parameters[0] = { }, stakeCurrency: { coinDenom: 'DV4TNT', - coinDecimals: 6, - coinMinimalDenom: 'dv4tnt', + coinDecimals: 18, + coinMinimalDenom: 'adv4tnt', }, currencies: [ { coinDenom: 'DV4TNT', - coinDecimals: 6, - coinMinimalDenom: 'dv4tnt', + coinDecimals: 18, + coinMinimalDenom: 'adv4tnt', }, { coinDenom: 'USDC', - coinMinimalDenom: 'ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5', coinDecimals: 6, + coinMinimalDenom: 'ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5', }, ], feeCurrencies: [ { coinDenom: 'DV4TNT', + coinDecimals: 18, + coinMinimalDenom: 'adv4tnt', + }, + { + coinDenom: 'USDC', coinDecimals: 6, - coinMinimalDenom: 'dv4tnt', + coinMinimalDenom: 'ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5', }, ], features: [], diff --git a/src/hooks/useSelectedNetwork.ts b/src/hooks/useSelectedNetwork.ts index 21a03a0..557dfa8 100644 --- a/src/hooks/useSelectedNetwork.ts +++ b/src/hooks/useSelectedNetwork.ts @@ -30,7 +30,7 @@ export const useSelectedNetwork = (): { useEffect(() => { if ( import.meta.env.MODE === 'production' && - ENVIRONMENT_CONFIG_MAP[selectedNetwork].dydxChainId === 'dydx-testnet-3' + ENVIRONMENT_CONFIG_MAP[selectedNetwork].dydxChainId === 'dydx-testnet-4' ) { dispatch( openDialog({ type: DialogTypes.ExchangeOffline, dialogProps: { preventClose: true } }) diff --git a/src/views/dialogs/ExchangeOfflineDialog.tsx b/src/views/dialogs/ExchangeOfflineDialog.tsx index 609b36e..676187e 100644 --- a/src/views/dialogs/ExchangeOfflineDialog.tsx +++ b/src/views/dialogs/ExchangeOfflineDialog.tsx @@ -34,7 +34,7 @@ export const ExchangeOfflineDialog = ({ preventClose, setIsOpen }: ElementProps) const showOfflineMessage = import.meta.env.MODE === 'production' && - ENVIRONMENT_CONFIG_MAP[selectedNetwork].dydxChainId === 'dydx-testnet-3'; + ENVIRONMENT_CONFIG_MAP[selectedNetwork].dydxChainId === 'dydx-testnet-4'; useEffect(() => { if (