Compare commits

..
Author SHA1 Message Date
James Jia - Test 8cca5f869e Update package.json 2023-10-24 14:09:12 -07:00
James Jia - Test 5d6d5780e1 Update README, package.json 2023-10-24 13:56:45 -07:00
James Jia - Test 1ac21bdb4d Update LICENSE and README 2023-10-24 13:53:37 -07:00
8 changed files with 49 additions and 93 deletions
+1 -1
View File
@@ -39,7 +39,7 @@
"@cosmjs/proto-signing": "^0.31.0", "@cosmjs/proto-signing": "^0.31.0",
"@cosmjs/stargate": "^0.31.0", "@cosmjs/stargate": "^0.31.0",
"@cosmjs/tendermint-rpc": "^0.31.0", "@cosmjs/tendermint-rpc": "^0.31.0",
"@dydxprotocol/v4-abacus": "^1.0.3", "@dydxprotocol/v4-abacus": "^0.7.6",
"@dydxprotocol/v4-client-js": "^0.40.3", "@dydxprotocol/v4-client-js": "^0.40.3",
"@dydxprotocol/v4-localization": "^0.1.32", "@dydxprotocol/v4-localization": "^0.1.32",
"@ethersproject/providers": "^5.7.2", "@ethersproject/providers": "^5.7.2",
+4 -4
View File
@@ -27,8 +27,8 @@ dependencies:
specifier: ^0.31.0 specifier: ^0.31.0
version: 0.31.0 version: 0.31.0
'@dydxprotocol/v4-abacus': '@dydxprotocol/v4-abacus':
specifier: ^1.0.3 specifier: ^0.7.6
version: 1.0.3 version: 0.7.6
'@dydxprotocol/v4-client-js': '@dydxprotocol/v4-client-js':
specifier: ^0.40.3 specifier: ^0.40.3
version: 0.40.3 version: 0.40.3
@@ -979,8 +979,8 @@ packages:
resolution: {integrity: sha512-RpfLEtTlyIxeNPGKcokS+p3BZII/Q3bYxryFRglh5H3A3T8q9fsLYm72VYAMEOOIBLEa8o93kFLiBDUWKrwXZA==} resolution: {integrity: sha512-RpfLEtTlyIxeNPGKcokS+p3BZII/Q3bYxryFRglh5H3A3T8q9fsLYm72VYAMEOOIBLEa8o93kFLiBDUWKrwXZA==}
dev: true dev: true
/@dydxprotocol/v4-abacus@1.0.3: /@dydxprotocol/v4-abacus@0.7.6:
resolution: {integrity: sha512-GuX37/DMMNSke8ZFcw52II7IVJfUgVGHqoi1Uw2cUb+hgIjjSG3OtbyRWedm5r6nqWq8BNLOexI0VVFB6OMVYg==} resolution: {integrity: sha512-FdDXRaFMfxhyrJJs0dNrb1KG6X95lPHelua1yCn/SVgzwGaAqlJczrzmdh98INntuRAgIxOu69R5mCGyekumyg==}
dev: false dev: false
/@dydxprotocol/v4-client-js@0.40.3: /@dydxprotocol/v4-client-js@0.40.3:
+37 -13
View File
@@ -8,43 +8,67 @@
], ],
"components": [ "components": [
{ {
"/": "/" "/": "/trade/*"
}, },
{ {
"/": "/#/" "/": "/r/*"
}, },
{ {
"/": "*/markets" "/": "/portfolio/overview"
}, },
{ {
"/": "*/trade" "/": "/portfolio/positions"
}, },
{ {
"/": "*/trade/*" "/": "/portfolio/orders"
}, },
{ {
"/": "*/portfolio" "/": "/portfolio/fees"
}, },
{ {
"/": "*/portfolio/overview" "/": "/portfolio/history"
}, },
{ {
"/": "*/portfolio/positions" "/": "/portfolio/history/trades"
}, },
{ {
"/": "*/portfolio/orders" "/": "/portfolio/history/transfers"
}, },
{ {
"/": "*/portfolio/fees" "/": "/portfolio/history/funding"
}, },
{ {
"/": "*/portfolio/history/trades" "/": "/rewards"
}, },
{ {
"/": "*/portfolio/history/transfers" "/": "/my-profile"
}, },
{ {
"/": "*/portfolio/history/funding" "/": "/rankings/hedgies"
},
{
"/": "/rankings/competition"
},
{
"/": "/rankings/diamond"
},
{
"/": "/rankings/platinum"
},
{
"/": "/rankings/gold"
},
{
"/": "/rankings/silver"
},
{
"/": "/rankings/bronze"
},
{
"/": "/rankings/pnl-absolute"
},
{
"/": "/rankings/pnl-percent"
}, },
{ {
"/": "/walletsegue", "/": "/walletsegue",
+1 -67
View File
@@ -25,8 +25,7 @@
"dydxprotocol-testnet-dsrv", "dydxprotocol-testnet-dsrv",
"dydxprotocol-testnet-nodefleet", "dydxprotocol-testnet-nodefleet",
"dydxprotocol-testnet-kingnodes", "dydxprotocol-testnet-kingnodes",
"dydxprotocol-testnet-liquify", "dydxprotocol-testnet-liquify"
"dydxprotocol-testnet-polkachu"
], ],
"default": "dydxprotocol-testnet" "default": "dydxprotocol-testnet"
} }
@@ -425,7 +424,6 @@
} }
], ],
"validators": [ "validators": [
"https://dydx-testnet-rpc.polkachu.com/",
"https://dydx-testnet.nodefleet.org", "https://dydx-testnet.nodefleet.org",
"https://test-dydx.kingnodes.com", "https://test-dydx.kingnodes.com",
"https://dydx-rpc.liquify.com/api=8878132/dydx" "https://dydx-rpc.liquify.com/api=8878132/dydx"
@@ -781,70 +779,6 @@
"signTypedDataDomainName": "dYdX V4" "signTypedDataDomainName": "dYdX V4"
} }
}, },
"dydxprotocol-testnet-polkachu": {
"name": "v4 Public Testnet/Polkahcu",
"ethereumChainId": "5",
"dydxChainId": "dydx-testnet-4",
"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://dydx-testnet.imperator.co",
"socket": "wss://dydx-testnet.imperator.co"
}
],
"validators": [
"https://dydx-testnet-rpc.polkachu.com/"
],
"0xsquid": "https://testnet.api.squidrouter.com",
"faucet": "https://faucet.v4testnet.dydx.exchange"
},
"links": {
"tos": "https://dydx.exchange/v4-terms",
"privacy": "https://dydx.exchange/privacy",
"statusPage": "https://status.v4testnet.dydx.exchange/",
"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 V4"
}
},
"dydxprotocol-mainnet": { "dydxprotocol-mainnet": {
"name": "v4", "name": "v4",
"ethereumChainId": "1", "ethereumChainId": "1",
+2 -2
View File
@@ -44,7 +44,7 @@ export const useTradingView = ({
const hasMarkets = marketIds.length > 0; const hasMarkets = marketIds.length > 0;
useEffect(() => { useEffect(() => {
if (hasMarkets && isClientConnected && marketId) { if (hasMarkets && isClientConnected) {
const widgetOptions = getWidgetOptions(); const widgetOptions = getWidgetOptions();
const widgetOverrides = getWidgetOverrides(appTheme); const widgetOverrides = getWidgetOverrides(appTheme);
const options = { const options = {
@@ -75,7 +75,7 @@ export const useTradingView = ({
tvWidgetRef.current = null; tvWidgetRef.current = null;
setIsChartReady(false); setIsChartReady(false);
}; };
}, [getCandlesForDatafeed, isClientConnected, hasMarkets, selectedLocale, selectedNetwork, !!marketId]); }, [getCandlesForDatafeed, isClientConnected, hasMarkets, selectedLocale, selectedNetwork]);
return { savedResolution }; return { savedResolution };
}; };
+3 -3
View File
@@ -107,8 +107,8 @@ export const getHydratedTradingData = ({
perpetualMarkets?: Record<string, PerpetualMarket>; perpetualMarkets?: Record<string, PerpetualMarket>;
}) => ({ }) => ({
...data, ...data,
asset: assets && perpetualMarkets && assets[perpetualMarkets[data.marketId]?.assetId], asset: assets && perpetualMarkets && assets[perpetualMarkets[data.marketId].assetId],
stepSizeDecimals: perpetualMarkets?.[data.marketId]?.configs?.stepSizeDecimals, stepSizeDecimals: perpetualMarkets?.[data.marketId].configs?.stepSizeDecimals,
tickSizeDecimals: perpetualMarkets?.[data.marketId]?.configs?.tickSizeDecimals, tickSizeDecimals: perpetualMarkets?.[data.marketId].configs?.tickSizeDecimals,
...('side' in data && { orderSide: convertAbacusOrderSide(data.side) }), ...('side' in data && { orderSide: convertAbacusOrderSide(data.side) }),
}); });
@@ -130,14 +130,12 @@ export const GenerateKeys = ({
} }
} }
} catch (error) { } catch (error) {
setStatus(EvmDerivedAccountStatus.NotDerived);
const { message } = parseWalletError({ error, stringGetter }); const { message } = parseWalletError({ error, stringGetter });
if (message) { if (message) {
track(AnalyticsEvent.OnboardingWalletIsNonDeterministic); track(AnalyticsEvent.OnboardingWalletIsNonDeterministic);
setError(message); setError(message);
} }
return;
} }
await setWalletFromEvmSignature(signature); await setWalletFromEvmSignature(signature);
+1 -1
View File
@@ -161,7 +161,7 @@ const getFillsTableColumnDef = ({
}[orderSide], }[orderSide],
})} })}
</Styled.Side> </Styled.Side>
<Output type={OutputType.Text} value={asset?.id} /> <Output type={OutputType.Text} value={asset.id} />
</Styled.TableCell> </Styled.TableCell>
), ),
}, },