Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0389178cb5 | ||
|
|
575856b77b | ||
|
|
e3609782ed |
+73
-3
@@ -56,15 +56,15 @@
|
|||||||
"endpoints": {
|
"endpoints": {
|
||||||
"indexers": [
|
"indexers": [
|
||||||
{
|
{
|
||||||
"api": "http://indexer.v4dev.dydx.exchange",
|
"api": "https://indexer.v4dev.dydx.exchange",
|
||||||
"socket": "wss://indexer.v4dev.dydx.exchange"
|
"socket": "wss://indexer.v4dev.dydx.exchange"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"validators": [
|
"validators": [
|
||||||
"http://validator.v4dev.dydx.exchange"
|
"https://validator.v4dev.dydx.exchange"
|
||||||
],
|
],
|
||||||
"0xsquid": "https://testnet.api.0xsquid.com",
|
"0xsquid": "https://testnet.api.0xsquid.com",
|
||||||
"faucet": "http://faucet.v4dev.dydx.exchange"
|
"faucet": "https://faucet.v4dev.dydx.exchange"
|
||||||
},
|
},
|
||||||
"links": {
|
"links": {
|
||||||
"tos": "https://dydx.exchange/v4-terms",
|
"tos": "https://dydx.exchange/v4-terms",
|
||||||
@@ -331,6 +331,76 @@
|
|||||||
"signTypedDataDomainName": "dYdX Chain"
|
"signTypedDataDomainName": "dYdX Chain"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"dydxprotocol-staging-forced-update": {
|
||||||
|
"name": "v4 Staging Forced Update",
|
||||||
|
"ethereumChainId": "5",
|
||||||
|
"dydxChainId": "dydxprotocol-testnet",
|
||||||
|
"chainName": "dYdX Chain",
|
||||||
|
"chainLogo": "dydx-chain.png",
|
||||||
|
"isMainNet": false,
|
||||||
|
"tokens": {
|
||||||
|
"chain": {
|
||||||
|
"name": "Dv4TNT",
|
||||||
|
"denom": "adv4tnt",
|
||||||
|
"decimals": 18,
|
||||||
|
"image": "/currencies/dydx.png"
|
||||||
|
},
|
||||||
|
"usdc": {
|
||||||
|
"name": "USDC",
|
||||||
|
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
||||||
|
"gasDenom": "uusdc",
|
||||||
|
"decimals": 6,
|
||||||
|
"image": "/currencies/usdc.png"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"endpoints": {
|
||||||
|
"indexers": [
|
||||||
|
{
|
||||||
|
"api": "https://indexer.v4staging.dydx.exchange",
|
||||||
|
"socket": "wss://indexer.v4staging.dydx.exchange"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucet": "https://faucet.v4staging.dydx.exchange",
|
||||||
|
"validators": [
|
||||||
|
"https://validator.v4staging.dydx.exchange"
|
||||||
|
],
|
||||||
|
"0xsquid": "https://testnet.api.squidrouter.com"
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"tos": "https://dydx.exchange/v4-terms",
|
||||||
|
"privacy": "https://dydx.exchange/privacy",
|
||||||
|
"mintscan": "https://testnet.mintscan.io/dydx-testnet/txs/{tx_hash}",
|
||||||
|
"documentation": "https://v4-teacher.vercel.app/",
|
||||||
|
"community": "https://discord.com/invite/dydx",
|
||||||
|
"feedback": "https://docs.google.com/forms/d/e/1FAIpQLSezLsWCKvAYDEb7L-2O4wOON1T56xxro9A2Azvl6IxXHP_15Q/viewform",
|
||||||
|
"blogs": "https://www.dydx.foundation/blog"
|
||||||
|
},
|
||||||
|
"wallets": {
|
||||||
|
"walletconnect": {
|
||||||
|
"client": {
|
||||||
|
"name": "dYdX v4",
|
||||||
|
"description": "dYdX v4 App",
|
||||||
|
"iconUrl": "/logos/dydx-x.png"
|
||||||
|
},
|
||||||
|
"v2": {
|
||||||
|
"projectId": "47559b2ec96c09aed9ff2cb54a31ab0e"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"walletSegue": {
|
||||||
|
"callbackUrl": "/walletsegue"
|
||||||
|
},
|
||||||
|
"images": "/wallets/",
|
||||||
|
"signTypedDataAction": "dYdX Chain Onboarding",
|
||||||
|
"signTypedDataDomainName": "dYdX Chain"
|
||||||
|
},
|
||||||
|
"apps": {
|
||||||
|
"ios": {
|
||||||
|
"minimalVersion": "1.0",
|
||||||
|
"build":40000,
|
||||||
|
"url": "https://apps.apple.com/app/dydx/id1564787350"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"dydxprotocol-staging-west": {
|
"dydxprotocol-staging-west": {
|
||||||
"name": "v4 Staging West",
|
"name": "v4 Staging West",
|
||||||
"ethereumChainId": "5",
|
"ethereumChainId": "5",
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import { useQuery } from 'react-query';
|
|||||||
import { formatUnits } from 'viem';
|
import { formatUnits } from 'viem';
|
||||||
|
|
||||||
import { ENVIRONMENT_CONFIG_MAP } from '@/constants/networks';
|
import { ENVIRONMENT_CONFIG_MAP } from '@/constants/networks';
|
||||||
import { QUANTUM_MULTIPLIER } from '@/constants/numbers';
|
|
||||||
import { EvmAddress } from '@/constants/wallets';
|
import { EvmAddress } from '@/constants/wallets';
|
||||||
|
|
||||||
import { convertBech32Address } from '@/lib/addressUtils';
|
import { convertBech32Address } from '@/lib/addressUtils';
|
||||||
@@ -21,7 +20,6 @@ import { useTokenConfigs } from './useTokenConfigs';
|
|||||||
type UseAccountBalanceProps = {
|
type UseAccountBalanceProps = {
|
||||||
// Token Items
|
// Token Items
|
||||||
addressOrDenom?: string;
|
addressOrDenom?: string;
|
||||||
assetSymbol?: string;
|
|
||||||
decimals?: number;
|
decimals?: number;
|
||||||
|
|
||||||
// Chain Items
|
// Chain Items
|
||||||
@@ -40,7 +38,6 @@ export const CHAIN_DEFAULT_TOKEN_ADDRESS = '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeee
|
|||||||
|
|
||||||
export const useAccountBalance = ({
|
export const useAccountBalance = ({
|
||||||
addressOrDenom,
|
addressOrDenom,
|
||||||
assetSymbol,
|
|
||||||
bech32AddrPrefix,
|
bech32AddrPrefix,
|
||||||
chainId,
|
chainId,
|
||||||
decimals = 0,
|
decimals = 0,
|
||||||
@@ -91,7 +88,7 @@ export const useAccountBalance = ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const { formatted: evmBalance } = evmQuery.data || {};
|
const { formatted: evmBalance } = evmQuery.data || {};
|
||||||
const balance = !assetSymbol ? '0' : isCosmosChain ? cosmosQuery.data : evmBalance;
|
const balance = isCosmosChain ? cosmosQuery.data : evmBalance;
|
||||||
|
|
||||||
const nativeTokenCoinBalance = balances?.[chainTokenDenom];
|
const nativeTokenCoinBalance = balances?.[chainTokenDenom];
|
||||||
const nativeTokenBalance = MustBigNumber(nativeTokenCoinBalance?.amount);
|
const nativeTokenBalance = MustBigNumber(nativeTokenCoinBalance?.amount);
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ import { OnboardingTriggerButton } from '@/views/dialogs/OnboardingTriggerButton
|
|||||||
import { openDialog } from '@/state/dialogs';
|
import { openDialog } from '@/state/dialogs';
|
||||||
import { calculateCanAccountTrade } from '@/state/accountCalculators';
|
import { calculateCanAccountTrade } from '@/state/accountCalculators';
|
||||||
|
|
||||||
// TODO(@aforaleka): replace with real data
|
|
||||||
export const DYDXBalancePanel = () => {
|
export const DYDXBalancePanel = () => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const stringGetter = useStringGetter();
|
const stringGetter = useStringGetter();
|
||||||
@@ -110,7 +109,7 @@ export const DYDXBalancePanel = () => {
|
|||||||
value: (
|
value: (
|
||||||
<Output
|
<Output
|
||||||
type={OutputType.Asset}
|
type={OutputType.Asset}
|
||||||
value={nativeTokenBalance + nativeStakingBalance}
|
value={nativeTokenBalance.plus(nativeStakingBalance)}
|
||||||
tag={chainTokenLabel}
|
tag={chainTokenLabel}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
@@ -126,7 +125,7 @@ const Styled: Record<string, AnyStyledComponent> = {};
|
|||||||
|
|
||||||
Styled.Header = styled.div`
|
Styled.Header = styled.div`
|
||||||
${layoutMixins.spacedRow}
|
${layoutMixins.spacedRow}
|
||||||
padding: 1.25rem 1.5rem 0.5rem;
|
padding: 1rem 1.5rem 0;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
Styled.Title = styled.h3`
|
Styled.Title = styled.h3`
|
||||||
@@ -155,7 +154,6 @@ Styled.ReceiveButton = styled(Button)`
|
|||||||
Styled.Content = styled.div`
|
Styled.Content = styled.div`
|
||||||
${layoutMixins.flexColumn}
|
${layoutMixins.flexColumn}
|
||||||
gap: 0.75rem;
|
gap: 0.75rem;
|
||||||
padding: 0 0.5rem 0.5rem;
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
Styled.IconContainer = styled.div`
|
Styled.IconContainer = styled.div`
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ export const DepositForm = ({ onDeposit, onError }: DepositFormProps) => {
|
|||||||
// Async Data
|
// Async Data
|
||||||
const { balance, queryStatus, isQueryFetching } = useAccountBalance({
|
const { balance, queryStatus, isQueryFetching } = useAccountBalance({
|
||||||
addressOrDenom: sourceToken?.address || CHAIN_DEFAULT_TOKEN_ADDRESS,
|
addressOrDenom: sourceToken?.address || CHAIN_DEFAULT_TOKEN_ADDRESS,
|
||||||
assetSymbol: sourceToken?.symbol || undefined,
|
|
||||||
chainId: chainId,
|
chainId: chainId,
|
||||||
decimals: sourceToken?.decimals || undefined,
|
decimals: sourceToken?.decimals || undefined,
|
||||||
isCosmosChain: false,
|
isCosmosChain: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user