Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0a00acdc6 | ||
|
|
c40f5eb549 | ||
|
|
d53e8f693e | ||
|
|
f9e301b3f0 | ||
|
|
67ecbd75b4 | ||
|
|
a05d88136d | ||
|
|
f1ca86326d | ||
|
|
5d1d734c59 | ||
|
|
9ba6b3d6ba | ||
|
|
62eeab06f5 | ||
|
|
fa621a085b | ||
|
|
0730e71109 |
@@ -33,11 +33,13 @@ jobs:
|
||||
AMPLITUDE_API_KEY: ${{ secrets.AMPLITUDE_API_KEY }}
|
||||
BUGSNAG_API_KEY: ${{ secrets.BUGSNAG_API_KEY }}
|
||||
STATUS_PAGE_SCRIPT_URI: ${{ secrets.STATUS_PAGE_SCRIPT_URI }}
|
||||
IOS_APP_ID: ${{ secrets.IOS_APP_ID }}
|
||||
run: |
|
||||
pnpm run build
|
||||
pnpm run build:inject-amplitude
|
||||
pnpm run build:inject-bugsnag
|
||||
pnpm run build:inject-statuspage
|
||||
sh scripts/inject-app-deeplinks.sh
|
||||
|
||||
- name: Upload to IPFS via web3.storage
|
||||
uses: dydxprotocol/add-to-web3@v1
|
||||
|
||||
+3
-2
@@ -10,6 +10,7 @@
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"build:inject-app-deeplinks": "sh scripts/inject-app-deeplinks.sh",
|
||||
"build:inject-amplitude": "node scripts/inject-amplitude.js",
|
||||
"build:inject-bugsnag": "node scripts/inject-bugsnag.js",
|
||||
"build:inject-statuspage": "node scripts/inject-statuspage.js",
|
||||
@@ -37,9 +38,9 @@
|
||||
"@cosmjs/proto-signing": "^0.31.0",
|
||||
"@cosmjs/stargate": "^0.31.0",
|
||||
"@cosmjs/tendermint-rpc": "^0.31.0",
|
||||
"@dydxprotocol/v4-abacus": "^0.6.3",
|
||||
"@dydxprotocol/v4-abacus": "^0.6.4",
|
||||
"@dydxprotocol/v4-client-js": "^0.36.1",
|
||||
"@dydxprotocol/v4-localization": "^0.1.23",
|
||||
"@dydxprotocol/v4-localization": "^0.1.28",
|
||||
"@ethersproject/providers": "^5.7.2",
|
||||
"@js-joda/core": "^5.5.3",
|
||||
"@radix-ui/react-collapsible": "^1.0.3",
|
||||
|
||||
Generated
+12
-12
@@ -1,9 +1,5 @@
|
||||
lockfileVersion: '6.0'
|
||||
|
||||
settings:
|
||||
autoInstallPeers: true
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
dependencies:
|
||||
'@0xsquid/sdk':
|
||||
specifier: ^1.10.0
|
||||
@@ -27,14 +23,14 @@ dependencies:
|
||||
specifier: ^0.31.0
|
||||
version: 0.31.0
|
||||
'@dydxprotocol/v4-abacus':
|
||||
specifier: ^0.6.3
|
||||
version: 0.6.3
|
||||
specifier: ^0.6.4
|
||||
version: 0.6.4
|
||||
'@dydxprotocol/v4-client-js':
|
||||
specifier: ^0.36.1
|
||||
version: 0.36.1
|
||||
'@dydxprotocol/v4-localization':
|
||||
specifier: ^0.1.23
|
||||
version: 0.1.23
|
||||
specifier: ^0.1.28
|
||||
version: 0.1.28
|
||||
'@ethersproject/providers':
|
||||
specifier: ^5.7.2
|
||||
version: 5.7.2
|
||||
@@ -979,8 +975,8 @@ packages:
|
||||
resolution: {integrity: sha512-RpfLEtTlyIxeNPGKcokS+p3BZII/Q3bYxryFRglh5H3A3T8q9fsLYm72VYAMEOOIBLEa8o93kFLiBDUWKrwXZA==}
|
||||
dev: true
|
||||
|
||||
/@dydxprotocol/v4-abacus@0.6.3:
|
||||
resolution: {integrity: sha512-oYMbII7o7fXjNpl2PZpG6mwKQ49e8Qky5vA8Ua9boNs7nRUx3PC6azfoPtjHKMdYY33eHoXcZBpTynhneLXCVg==}
|
||||
/@dydxprotocol/v4-abacus@0.6.4:
|
||||
resolution: {integrity: sha512-eH+/9Q/OnQtwzBwM1BJyXybFPdivGmFQWrxM71MFWGs6uIQGbZX775mpoa8deweSTyQ/QrRLRQ1mP2BPDgBQYg==}
|
||||
dev: false
|
||||
|
||||
/@dydxprotocol/v4-client-js@0.36.1:
|
||||
@@ -1010,8 +1006,8 @@ packages:
|
||||
- utf-8-validate
|
||||
dev: false
|
||||
|
||||
/@dydxprotocol/v4-localization@0.1.23:
|
||||
resolution: {integrity: sha512-TaEey7dINwxELlEyA8XsQ4GQLfJ7e1b434bafpnlG9ccW1sIW7TYTsfaSkck2egR4R736hA7k5WvVy0aI/0TFw==}
|
||||
/@dydxprotocol/v4-localization@0.1.28:
|
||||
resolution: {integrity: sha512-g6LwjX7EIRm9HISfSX0H6yhktBCZby5opP/yI2aIUvn2OYyB25WcjLEuEvzW5Bh9XXiLijgLf3Tk91wPKWuFbA==}
|
||||
dev: false
|
||||
|
||||
/@dydxprotocol/v4-proto@0.2.1:
|
||||
@@ -14099,3 +14095,7 @@ packages:
|
||||
/zwitch@2.0.4:
|
||||
resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==}
|
||||
dev: true
|
||||
|
||||
settings:
|
||||
autoInstallPeers: true
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
+707
-117
@@ -1,31 +1,42 @@
|
||||
{
|
||||
"deployments":{
|
||||
"MAINNET":null,
|
||||
"TESTNET":{
|
||||
"environments":[
|
||||
"deployments": {
|
||||
"MAINNET": {
|
||||
"environments": [
|
||||
"dydxprotocol-mainnet"
|
||||
],
|
||||
"default": "dydxprotocol-mainnet"
|
||||
},
|
||||
"TESTNET": {
|
||||
"environments": [
|
||||
"dydxprotocol-testnet"
|
||||
],
|
||||
"default":"dydxprotocol-testnet"
|
||||
"default": "dydxprotocol-testnet"
|
||||
},
|
||||
"DEV":{
|
||||
"environments":[
|
||||
"DEV": {
|
||||
"environments": [
|
||||
"dydxprotocol-dev",
|
||||
"dydxprotocol-dev-2",
|
||||
"dydxprotocol-dev-4",
|
||||
"dydxprotocol-dev-5",
|
||||
"dydxprotocol-staging",
|
||||
"dydxprotocol-testnet"
|
||||
"dydxprotocol-staging-west",
|
||||
"dydxprotocol-testnet",
|
||||
"dydxprotocol-testnet-dydx",
|
||||
"dydxprotocol-testnet-dsrv",
|
||||
"dydxprotocol-testnet-nodefleet",
|
||||
"dydxprotocol-testnet-kingnodes",
|
||||
"dydxprotocol-testnet-liquify"
|
||||
],
|
||||
"default":"dydxprotocol-testnet"
|
||||
"default": "dydxprotocol-testnet"
|
||||
}
|
||||
},
|
||||
"environments":{
|
||||
"dydxprotocol-dev":{
|
||||
"name":"v4 Dev",
|
||||
"ethereumChainId":"5",
|
||||
"dydxChainId":"dydxprotocol-testnet",
|
||||
"isMainNet":false,
|
||||
"tokens":{
|
||||
"environments": {
|
||||
"dydxprotocol-dev": {
|
||||
"name": "v4 Dev",
|
||||
"ethereumChainId": "5",
|
||||
"dydxChainId": "dydxprotocol-testnet",
|
||||
"isMainNet": false,
|
||||
"tokens": {
|
||||
"chain": {
|
||||
"name": "DYDX",
|
||||
"denom": "dv4tnt",
|
||||
@@ -34,34 +45,57 @@
|
||||
"usdc": {
|
||||
"name": "USDC",
|
||||
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
||||
"gasDenom": "uusdc",
|
||||
"image": "/currencies/usdc.png"
|
||||
}
|
||||
},
|
||||
"endpoints":{
|
||||
"indexers":[
|
||||
"endpoints": {
|
||||
"indexers": [
|
||||
{
|
||||
"api":"http://indexer.v4dev.dydx.exchange",
|
||||
"socket":"wss://indexer.v4dev.dydx.exchange"
|
||||
"api": "http://indexer.v4dev.dydx.exchange",
|
||||
"socket": "wss://indexer.v4dev.dydx.exchange"
|
||||
}
|
||||
],
|
||||
"validators":[
|
||||
"validators": [
|
||||
"http://validator.v4dev.dydx.exchange"
|
||||
],
|
||||
"0xsquid":"https://testnet.api.0xsquid.com",
|
||||
"faucet":"http://faucet.v4dev.dydx.exchange"
|
||||
"0xsquid": "https://testnet.api.0xsquid.com",
|
||||
"faucet": "http://faucet.v4dev.dydx.exchange"
|
||||
},
|
||||
"links":{
|
||||
"tos":"https://dydx.exchange/v4-terms",
|
||||
"privacy":"https://dydx.exchange/privacy",
|
||||
"mintscan":"https://testnet.mintscan.io/dydx-testnet/txs/{tx_hash}"
|
||||
"links": {
|
||||
"tos": "https://dydx.exchange/v4-terms",
|
||||
"privacy": "https://dydx.exchange/privacy",
|
||||
"mintscan": "https://testnet.mintscan.io/dydx-testnet/txs/{tx_hash}",
|
||||
"blogs": "https://www.dydx.foundation/blog"
|
||||
},
|
||||
"wallets": {
|
||||
"walletconnect": {
|
||||
"client": {
|
||||
"name": "dYdX v4",
|
||||
"description": "dYdX v4 App",
|
||||
"iconUrl": "/logos/dydx-x.png"
|
||||
},
|
||||
"v1": {
|
||||
"bridgeUrl": "wss://api.stage.dydx.exchange/wc/"
|
||||
},
|
||||
"v2": {
|
||||
"projectId": "47559b2ec96c09aed9ff2cb54a31ab0e"
|
||||
}
|
||||
},
|
||||
"walletSegue": {
|
||||
"callbackUrl": "/walletsegue"
|
||||
},
|
||||
"images": "/wallets/",
|
||||
"signTypedDataAction": "dYdX Chain Onboarding",
|
||||
"signTypedDataDomainName": "dYdX Chain"
|
||||
}
|
||||
},
|
||||
"dydxprotocol-dev-2":{
|
||||
"name":"v4 Dev 2",
|
||||
"ethereumChainId":"5",
|
||||
"dydxChainId":"dydxprotocol-testnet",
|
||||
"isMainNet":false,
|
||||
"tokens":{
|
||||
"dydxprotocol-dev-2": {
|
||||
"name": "v4 Dev 2",
|
||||
"ethereumChainId": "5",
|
||||
"dydxChainId": "dydxprotocol-testnet",
|
||||
"isMainNet": false,
|
||||
"tokens": {
|
||||
"chain": {
|
||||
"name": "DYDX",
|
||||
"denom": "dv4tnt",
|
||||
@@ -70,33 +104,56 @@
|
||||
"usdc": {
|
||||
"name": "USDC",
|
||||
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
||||
"gasDenom": "uusdc",
|
||||
"image": "/currencies/usdc.png"
|
||||
}
|
||||
},
|
||||
"endpoints":{
|
||||
"indexers":[
|
||||
"endpoints": {
|
||||
"indexers": [
|
||||
{
|
||||
"api":"http://dev2-indexer-apne1-lb-public-2076363889.ap-northeast-1.elb.amazonaws.com",
|
||||
"socket":"ws://dev2-indexer-apne1-lb-public-2076363889.ap-northeast-1.elb.amazonaws.com"
|
||||
"api": "http://dev2-indexer-apne1-lb-public-2076363889.ap-northeast-1.elb.amazonaws.com",
|
||||
"socket": "ws://dev2-indexer-apne1-lb-public-2076363889.ap-northeast-1.elb.amazonaws.com"
|
||||
}
|
||||
],
|
||||
"validators":[
|
||||
"validators": [
|
||||
"http://35.75.227.118"
|
||||
],
|
||||
"0xsquid":"https://testnet.api.0xsquid.com"
|
||||
"0xsquid": "https://testnet.api.0xsquid.com"
|
||||
},
|
||||
"links":{
|
||||
"tos":"https://dydx.exchange/v4-terms",
|
||||
"privacy":"https://dydx.exchange/privacy",
|
||||
"mintscan":"https://testnet.mintscan.io/dydx-testnet/txs/{tx_hash}"
|
||||
"links": {
|
||||
"tos": "https://dydx.exchange/v4-terms",
|
||||
"privacy": "https://dydx.exchange/privacy",
|
||||
"mintscan": "https://testnet.mintscan.io/dydx-testnet/txs/{tx_hash}",
|
||||
"blogs": "https://www.dydx.foundation/blog"
|
||||
},
|
||||
"wallets": {
|
||||
"walletconnect": {
|
||||
"client": {
|
||||
"name": "dYdX v4",
|
||||
"description": "dYdX v4 App",
|
||||
"iconUrl": "/logos/dydx-x.png"
|
||||
},
|
||||
"v1": {
|
||||
"bridgeUrl": "wss://api.stage.dydx.exchange/wc/"
|
||||
},
|
||||
"v2": {
|
||||
"projectId": "47559b2ec96c09aed9ff2cb54a31ab0e"
|
||||
}
|
||||
},
|
||||
"walletSegue": {
|
||||
"callbackUrl": "/walletsegue"
|
||||
},
|
||||
"images": "/wallets/",
|
||||
"signTypedDataAction": "dYdX Chain Onboarding",
|
||||
"signTypedDataDomainName": "dYdX Chain"
|
||||
}
|
||||
},
|
||||
"dydxprotocol-dev-4":{
|
||||
"name":"v4 Dev 4",
|
||||
"ethereumChainId":"5",
|
||||
"dydxChainId":"dydxprotocol-testnet",
|
||||
"isMainNet":false,
|
||||
"tokens":{
|
||||
"dydxprotocol-dev-4": {
|
||||
"name": "v4 Dev 4",
|
||||
"ethereumChainId": "5",
|
||||
"dydxChainId": "dydxprotocol-testnet",
|
||||
"isMainNet": false,
|
||||
"tokens": {
|
||||
"chain": {
|
||||
"name": "DYDX",
|
||||
"denom": "dv4tnt",
|
||||
@@ -105,33 +162,56 @@
|
||||
"usdc": {
|
||||
"name": "USDC",
|
||||
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
||||
"gasDenom": "uusdc",
|
||||
"image": "/currencies/usdc.png"
|
||||
}
|
||||
},
|
||||
"endpoints":{
|
||||
"indexers":[
|
||||
"endpoints": {
|
||||
"indexers": [
|
||||
{
|
||||
"api":"http://indexer.v4dev4.dydx.exchange",
|
||||
"socket":"ws://indexer.v4dev4.dydx.exchange"
|
||||
"api": "http://indexer.v4dev4.dydx.exchange",
|
||||
"socket": "ws://indexer.v4dev4.dydx.exchange"
|
||||
}
|
||||
],
|
||||
"validators":[
|
||||
"validators": [
|
||||
"http://validator.v4dev4.dydx.exchange"
|
||||
],
|
||||
"0xsquid":"https://testnet.api.0xsquid.com"
|
||||
"0xsquid": "https://testnet.api.0xsquid.com"
|
||||
},
|
||||
"links":{
|
||||
"tos":"https://dydx.exchange/v4-terms",
|
||||
"privacy":"https://dydx.exchange/privacy",
|
||||
"mintscan":"https://testnet.mintscan.io/dydx-testnet/txs/{tx_hash}"
|
||||
"links": {
|
||||
"tos": "https://dydx.exchange/v4-terms",
|
||||
"privacy": "https://dydx.exchange/privacy",
|
||||
"mintscan": "https://testnet.mintscan.io/dydx-testnet/txs/{tx_hash}",
|
||||
"blogs": "https://www.dydx.foundation/blog"
|
||||
},
|
||||
"wallets": {
|
||||
"walletconnect": {
|
||||
"client": {
|
||||
"name": "dYdX v4",
|
||||
"description": "dYdX v4 App",
|
||||
"iconUrl": "/logos/dydx-x.png"
|
||||
},
|
||||
"v1": {
|
||||
"bridgeUrl": "wss://api.stage.dydx.exchange/wc/"
|
||||
},
|
||||
"v2": {
|
||||
"projectId": "47559b2ec96c09aed9ff2cb54a31ab0e"
|
||||
}
|
||||
},
|
||||
"walletSegue": {
|
||||
"callbackUrl": "/walletsegue"
|
||||
},
|
||||
"images": "/wallets/",
|
||||
"signTypedDataAction": "dYdX Chain Onboarding",
|
||||
"signTypedDataDomainName": "dYdX Chain"
|
||||
}
|
||||
},
|
||||
"dydxprotocol-dev-5":{
|
||||
"name":"v4 Dev 5",
|
||||
"ethereumChainId":"5",
|
||||
"dydxChainId":"dydxprotocol-testnet",
|
||||
"isMainNet":false,
|
||||
"tokens":{
|
||||
"dydxprotocol-dev-5": {
|
||||
"name": "v4 Dev 5",
|
||||
"ethereumChainId": "5",
|
||||
"dydxChainId": "dydxprotocol-testnet",
|
||||
"isMainNet": false,
|
||||
"tokens": {
|
||||
"chain": {
|
||||
"name": "DYDX",
|
||||
"denom": "dv4tnt",
|
||||
@@ -140,33 +220,56 @@
|
||||
"usdc": {
|
||||
"name": "USDC",
|
||||
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
||||
"gasDenom": "uusdc",
|
||||
"image": "/currencies/usdc.png"
|
||||
}
|
||||
},
|
||||
"endpoints":{
|
||||
"indexers":[
|
||||
"endpoints": {
|
||||
"indexers": [
|
||||
{
|
||||
"api":"http://dev5-indexer-apne1-lb-public-1721328151.ap-northeast-1.elb.amazonaws.com",
|
||||
"socket":"ws://dev5-indexer-apne1-lb-public-1721328151.ap-northeast-1.elb.amazonaws.com"
|
||||
"api": "http://dev5-indexer-apne1-lb-public-1721328151.ap-northeast-1.elb.amazonaws.com",
|
||||
"socket": "ws://dev5-indexer-apne1-lb-public-1721328151.ap-northeast-1.elb.amazonaws.com"
|
||||
}
|
||||
],
|
||||
"validators":[
|
||||
"validators": [
|
||||
"http://18.223.78.50"
|
||||
],
|
||||
"0xsquid":"https://testnet.api.0xsquid.com"
|
||||
"0xsquid": "https://testnet.api.0xsquid.com"
|
||||
},
|
||||
"links":{
|
||||
"tos":"https://dydx.exchange/v4-terms",
|
||||
"privacy":"https://dydx.exchange/privacy",
|
||||
"mintscan":"https://testnet.mintscan.io/dydx-testnet/txs/{tx_hash}"
|
||||
"links": {
|
||||
"tos": "https://dydx.exchange/v4-terms",
|
||||
"privacy": "https://dydx.exchange/privacy",
|
||||
"mintscan": "https://testnet.mintscan.io/dydx-testnet/txs/{tx_hash}",
|
||||
"blogs": "https://www.dydx.foundation/blog"
|
||||
},
|
||||
"wallets": {
|
||||
"walletconnect": {
|
||||
"client": {
|
||||
"name": "dYdX v4",
|
||||
"description": "dYdX v4 App",
|
||||
"iconUrl": "/logos/dydx-x.png"
|
||||
},
|
||||
"v1": {
|
||||
"bridgeUrl": "wss://api.stage.dydx.exchange/wc/"
|
||||
},
|
||||
"v2": {
|
||||
"projectId": "47559b2ec96c09aed9ff2cb54a31ab0e"
|
||||
}
|
||||
},
|
||||
"walletSegue": {
|
||||
"callbackUrl": "/walletsegue"
|
||||
},
|
||||
"images": "/wallets/",
|
||||
"signTypedDataAction": "dYdX Chain Onboarding",
|
||||
"signTypedDataDomainName": "dYdX Chain"
|
||||
}
|
||||
},
|
||||
"dydxprotocol-staging":{
|
||||
"name":"v4 Staging",
|
||||
"ethereumChainId":"5",
|
||||
"dydxChainId":"dydxprotocol-testnet",
|
||||
"isMainNet":false,
|
||||
"tokens":{
|
||||
"dydxprotocol-staging": {
|
||||
"name": "v4 Staging",
|
||||
"ethereumChainId": "5",
|
||||
"dydxChainId": "dydxprotocol-testnet",
|
||||
"isMainNet": false,
|
||||
"tokens": {
|
||||
"chain": {
|
||||
"name": "DYDX",
|
||||
"denom": "dv4tnt",
|
||||
@@ -175,37 +278,60 @@
|
||||
"usdc": {
|
||||
"name": "USDC",
|
||||
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
||||
"gasDenom": "uusdc",
|
||||
"image": "/currencies/usdc.png"
|
||||
}
|
||||
},
|
||||
"endpoints":{
|
||||
"indexers":[
|
||||
"endpoints": {
|
||||
"indexers": [
|
||||
{
|
||||
"api":"https://indexer.v4staging.dydx.exchange",
|
||||
"socket":"wss://indexer.v4staging.dydx.exchange"
|
||||
"api": "https://indexer.v4staging.dydx.exchange",
|
||||
"socket": "wss://indexer.v4staging.dydx.exchange"
|
||||
}
|
||||
],
|
||||
"faucet":"https://faucet.v4staging.dydx.exchange",
|
||||
"validators":[
|
||||
"faucet": "https://faucet.v4staging.dydx.exchange",
|
||||
"validators": [
|
||||
"https://validator.v4staging.dydx.exchange"
|
||||
],
|
||||
"0xsquid":"https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app"
|
||||
"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"
|
||||
"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"
|
||||
},
|
||||
"v1": {
|
||||
"bridgeUrl": "wss://api.stage.dydx.exchange/wc/"
|
||||
},
|
||||
"v2": {
|
||||
"projectId": "47559b2ec96c09aed9ff2cb54a31ab0e"
|
||||
}
|
||||
},
|
||||
"walletSegue": {
|
||||
"callbackUrl": "/walletsegue"
|
||||
},
|
||||
"images": "/wallets/",
|
||||
"signTypedDataAction": "dYdX Chain Onboarding",
|
||||
"signTypedDataDomainName": "dYdX Chain"
|
||||
}
|
||||
},
|
||||
"dydxprotocol-testnet":{
|
||||
"name":"v4 Public Testnet",
|
||||
"ethereumChainId":"5",
|
||||
"dydxChainId":"dydx-testnet-3",
|
||||
"isMainNet":false,
|
||||
"tokens":{
|
||||
"dydxprotocol-staging-west": {
|
||||
"name": "v4 Staging West",
|
||||
"ethereumChainId": "5",
|
||||
"dydxChainId": "dydxprotocol-testnet",
|
||||
"isMainNet": false,
|
||||
"tokens": {
|
||||
"chain": {
|
||||
"name": "DYDX",
|
||||
"denom": "dv4tnt",
|
||||
@@ -214,30 +340,494 @@
|
||||
"usdc": {
|
||||
"name": "USDC",
|
||||
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
||||
"gasDenom": "uusdc",
|
||||
"image": "/currencies/usdc.png"
|
||||
}
|
||||
},
|
||||
"endpoints":{
|
||||
"indexers":[
|
||||
"endpoints": {
|
||||
"indexers": [
|
||||
{
|
||||
"api":"https://dydx-testnet.imperator.co",
|
||||
"socket":"wss://dydx-testnet.imperator.co"
|
||||
"api": "https://indexer.v4staging.dydx.exchange",
|
||||
"socket": "wss://indexer.v4staging.dydx.exchange"
|
||||
}
|
||||
],
|
||||
"validators":[
|
||||
"https://dydx-testnet.nodefleet.org",
|
||||
"https://test-dydx.kingnodes.com/"
|
||||
"faucet": "https://faucet.v4staging.dydx.exchange",
|
||||
"validators": [
|
||||
"https://validator-uswest1.v4staging.dydx.exchange"
|
||||
],
|
||||
"0xsquid":"https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app",
|
||||
"faucet":"https://faucet.v4testnet.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"
|
||||
"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"
|
||||
},
|
||||
"v1": {
|
||||
"bridgeUrl": "wss://api.stage.dydx.exchange/wc/"
|
||||
},
|
||||
"v2": {
|
||||
"projectId": "47559b2ec96c09aed9ff2cb54a31ab0e"
|
||||
}
|
||||
},
|
||||
"walletSegue": {
|
||||
"callbackUrl": "/walletsegue"
|
||||
},
|
||||
"images": "/wallets/",
|
||||
"signTypedDataAction": "dYdX Chain Onboarding",
|
||||
"signTypedDataDomainName": "dYdX Chain"
|
||||
}
|
||||
},
|
||||
"dydxprotocol-testnet": {
|
||||
"name": "v4 Public Testnet",
|
||||
"ethereumChainId": "5",
|
||||
"dydxChainId": "dydx-testnet-3",
|
||||
"isMainNet": false,
|
||||
"tokens": {
|
||||
"chain": {
|
||||
"name": "DYDX",
|
||||
"denom": "dv4tnt",
|
||||
"image": "/currencies/dydx.png"
|
||||
},
|
||||
"usdc": {
|
||||
"name": "USDC",
|
||||
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
||||
"gasDenom": "uusdc",
|
||||
"image": "/currencies/usdc.png"
|
||||
}
|
||||
},
|
||||
"endpoints": {
|
||||
"indexers": [
|
||||
{
|
||||
"api": "https://dydx-testnet.imperator.co",
|
||||
"socket": "wss://dydx-testnet.imperator.co"
|
||||
}
|
||||
],
|
||||
"validators": [
|
||||
"https://dydx-testnet.nodefleet.org",
|
||||
"https://test-dydx.kingnodes.com",
|
||||
"https://dydx-rpc.liquify.com/api=8878132/dydx"
|
||||
],
|
||||
"0xsquid": "https://testnet.api.squidrouter.com",
|
||||
"faucet": "https://faucet.v4testnet.dydx.exchange"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"v1": {
|
||||
"bridgeUrl": "wss://api.stage.dydx.exchange/wc/"
|
||||
},
|
||||
"v2": {
|
||||
"projectId": "47559b2ec96c09aed9ff2cb54a31ab0e"
|
||||
}
|
||||
},
|
||||
"walletSegue": {
|
||||
"callbackUrl": "/walletsegue"
|
||||
},
|
||||
"images": "/wallets/",
|
||||
"signTypedDataAction": "dYdX V4 Onboarding",
|
||||
"signTypedDataDomainName": "dYdX V4"
|
||||
}
|
||||
},
|
||||
"dydxprotocol-testnet-dydx": {
|
||||
"name": "v4 Public Testnet/dYdX",
|
||||
"ethereumChainId": "5",
|
||||
"dydxChainId": "dydx-testnet-3",
|
||||
"isMainNet": false,
|
||||
"tokens": {
|
||||
"chain": {
|
||||
"name": "DYDX",
|
||||
"denom": "dv4tnt",
|
||||
"image": "/currencies/dydx.png"
|
||||
},
|
||||
"usdc": {
|
||||
"name": "USDC",
|
||||
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
||||
"gasDenom": "uusdc",
|
||||
"image": "/currencies/usdc.png"
|
||||
}
|
||||
},
|
||||
"endpoints": {
|
||||
"indexers": [
|
||||
{
|
||||
"api": "https://indexer.v4testnet.dydx.exchange",
|
||||
"socket": "wss://indexer.v4testnet.dydx.exchange"
|
||||
}
|
||||
],
|
||||
"validators": [
|
||||
"https://validator.v4testnet.dydx.exchange"
|
||||
],
|
||||
"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"
|
||||
},
|
||||
"v1": {
|
||||
"bridgeUrl": "wss://api.stage.dydx.exchange/wc/"
|
||||
},
|
||||
"v2": {
|
||||
"projectId": "47559b2ec96c09aed9ff2cb54a31ab0e"
|
||||
}
|
||||
},
|
||||
"walletSegue": {
|
||||
"callbackUrl": "/walletsegue"
|
||||
},
|
||||
"images": "/wallets/",
|
||||
"signTypedDataAction": "dYdX V4 Onboarding",
|
||||
"signTypedDataDomainName": "dYdX V4"
|
||||
}
|
||||
},
|
||||
"dydxprotocol-testnet-dsrv": {
|
||||
"name": "v4 Public Testnet/DSRV",
|
||||
"ethereumChainId": "5",
|
||||
"dydxChainId": "dydx-testnet-3",
|
||||
"isMainNet": false,
|
||||
"tokens": {
|
||||
"chain": {
|
||||
"name": "DYDX",
|
||||
"denom": "dv4tnt",
|
||||
"image": "/currencies/dydx.png"
|
||||
},
|
||||
"usdc": {
|
||||
"name": "USDC",
|
||||
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
||||
"gasDenom": "uusdc",
|
||||
"image": "/currencies/usdc.png"
|
||||
}
|
||||
},
|
||||
"endpoints": {
|
||||
"indexers": [
|
||||
{
|
||||
"api": "https://dydx-testnet.imperator.co",
|
||||
"socket": "wss://dydx-testnet.imperator.co"
|
||||
}
|
||||
],
|
||||
"validators": [
|
||||
"https://dydx-testnet-archive.allthatnode.com:26657/XZvMM41hESf8PJrEQiTzbCOMVyFca79R"
|
||||
],
|
||||
"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"
|
||||
},
|
||||
"v1": {
|
||||
"bridgeUrl": "wss://api.stage.dydx.exchange/wc/"
|
||||
},
|
||||
"v2": {
|
||||
"projectId": "47559b2ec96c09aed9ff2cb54a31ab0e"
|
||||
}
|
||||
},
|
||||
"walletSegue": {
|
||||
"callbackUrl": "/walletsegue"
|
||||
},
|
||||
"images": "/wallets/",
|
||||
"signTypedDataAction": "dYdX V4 Onboarding",
|
||||
"signTypedDataDomainName": "dYdX V4"
|
||||
}
|
||||
},
|
||||
"dydxprotocol-testnet-nodefleet": {
|
||||
"name": "v4 Public Testnet/nodefleet",
|
||||
"ethereumChainId": "5",
|
||||
"dydxChainId": "dydx-testnet-3",
|
||||
"isMainNet": false,
|
||||
"tokens": {
|
||||
"chain": {
|
||||
"name": "DYDX",
|
||||
"denom": "dv4tnt",
|
||||
"image": "/currencies/dydx.png"
|
||||
},
|
||||
"usdc": {
|
||||
"name": "USDC",
|
||||
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
||||
"gasDenom": "uusdc",
|
||||
"image": "/currencies/usdc.png"
|
||||
}
|
||||
},
|
||||
"endpoints": {
|
||||
"indexers": [
|
||||
{
|
||||
"api": "https://dydx-testnet.imperator.co",
|
||||
"socket": "wss://dydx-testnet.imperator.co"
|
||||
}
|
||||
],
|
||||
"validators": [
|
||||
"https://dydx-testnet.nodefleet.org"
|
||||
],
|
||||
"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"
|
||||
},
|
||||
"v1": {
|
||||
"bridgeUrl": "wss://api.stage.dydx.exchange/wc/"
|
||||
},
|
||||
"v2": {
|
||||
"projectId": "47559b2ec96c09aed9ff2cb54a31ab0e"
|
||||
}
|
||||
},
|
||||
"walletSegue": {
|
||||
"callbackUrl": "/walletsegue"
|
||||
},
|
||||
"images": "/wallets/",
|
||||
"signTypedDataAction": "dYdX V4 Onboarding",
|
||||
"signTypedDataDomainName": "dYdX V4"
|
||||
}
|
||||
},
|
||||
"dydxprotocol-testnet-kingnodes": {
|
||||
"name": "v4 Public Testnet/KingNodes",
|
||||
"ethereumChainId": "5",
|
||||
"dydxChainId": "dydx-testnet-3",
|
||||
"isMainNet": false,
|
||||
"tokens": {
|
||||
"chain": {
|
||||
"name": "DYDX",
|
||||
"denom": "dv4tnt",
|
||||
"image": "/currencies/dydx.png"
|
||||
},
|
||||
"usdc": {
|
||||
"name": "USDC",
|
||||
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
||||
"gasDenom": "uusdc",
|
||||
"image": "/currencies/usdc.png"
|
||||
}
|
||||
},
|
||||
"endpoints": {
|
||||
"indexers": [
|
||||
{
|
||||
"api": "https://dydx-testnet.imperator.co",
|
||||
"socket": "wss://dydx-testnet.imperator.co"
|
||||
}
|
||||
],
|
||||
"validators": [
|
||||
"https://test-dydx.kingnodes.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"
|
||||
},
|
||||
"v1": {
|
||||
"bridgeUrl": "wss://api.stage.dydx.exchange/wc/"
|
||||
},
|
||||
"v2": {
|
||||
"projectId": "47559b2ec96c09aed9ff2cb54a31ab0e"
|
||||
}
|
||||
},
|
||||
"walletSegue": {
|
||||
"callbackUrl": "/walletsegue"
|
||||
},
|
||||
"images": "/wallets/",
|
||||
"signTypedDataAction": "dYdX V4 Onboarding",
|
||||
"signTypedDataDomainName": "dYdX V4"
|
||||
}
|
||||
},
|
||||
"dydxprotocol-testnet-liquify": {
|
||||
"name": "v4 Public Testnet/Liquify",
|
||||
"ethereumChainId": "5",
|
||||
"dydxChainId": "dydx-testnet-3",
|
||||
"isMainNet": false,
|
||||
"tokens": {
|
||||
"chain": {
|
||||
"name": "DYDX",
|
||||
"denom": "dv4tnt",
|
||||
"image": "/currencies/dydx.png"
|
||||
},
|
||||
"usdc": {
|
||||
"name": "USDC",
|
||||
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
||||
"gasDenom": "uusdc",
|
||||
"image": "/currencies/usdc.png"
|
||||
}
|
||||
},
|
||||
"endpoints": {
|
||||
"indexers": [
|
||||
{
|
||||
"api": "https://dydx-testnet.imperator.co",
|
||||
"socket": "wss://dydx-testnet.imperator.co"
|
||||
}
|
||||
],
|
||||
"validators": [
|
||||
"https://dydx-rpc.liquify.com/api=8878132/dydx"
|
||||
],
|
||||
"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"
|
||||
},
|
||||
"v1": {
|
||||
"bridgeUrl": "wss://api.stage.dydx.exchange/wc/"
|
||||
},
|
||||
"v2": {
|
||||
"projectId": "47559b2ec96c09aed9ff2cb54a31ab0e"
|
||||
}
|
||||
},
|
||||
"walletSegue": {
|
||||
"callbackUrl": "/walletsegue"
|
||||
},
|
||||
"images": "/wallets/",
|
||||
"signTypedDataAction": "dYdX V4 Onboarding",
|
||||
"signTypedDataDomainName": "dYdX V4"
|
||||
}
|
||||
},
|
||||
"dydxprotocol-mainet": {
|
||||
"name": "v4",
|
||||
"ethereumChainId": "1",
|
||||
"dydxChainId": "[mainnet chain id]",
|
||||
"isMainNet": true,
|
||||
"tokens": {
|
||||
"comment": "Change according to mainnet release",
|
||||
"chain": {
|
||||
"name": "DYDX",
|
||||
"denom": "dv4tnt",
|
||||
"image": "/currencies/dydx.png"
|
||||
},
|
||||
"usdc": {
|
||||
"name": "USDC",
|
||||
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
||||
"gasDenom": "uusdc",
|
||||
"image": "/currencies/usdc.png"
|
||||
}
|
||||
},
|
||||
"endpoints": {
|
||||
"indexers": [
|
||||
{
|
||||
"api": "[REST endpoint]",
|
||||
"socket": "[Websocket endpoint]"
|
||||
}
|
||||
],
|
||||
"validators": [
|
||||
"[Validator endpoint 1",
|
||||
"[Validator endpoint n]"
|
||||
],
|
||||
"0xsquid": "[0xSquid endpoint for mainnet]"
|
||||
},
|
||||
"links": {
|
||||
"tos": "[HTTP link to TOS]",
|
||||
"privacy": "[HTTP link to Privacy Policy]",
|
||||
"mintscan": "[HTTP link to Mintscan, with {tx_hash} placeholder]",
|
||||
"documentation": "[HTTP link to documentation, can be null]",
|
||||
"community": "[HTTP link to community, can be null]",
|
||||
"feedback": "[HTTP link to feedback form, can be null]",
|
||||
"blogs": "[HTTP link to blogs, can be null]"
|
||||
},
|
||||
"wallets": {
|
||||
"walletconnect": {
|
||||
"client": {
|
||||
"name": "[Name of the app]",
|
||||
"description": "[Description of the app]",
|
||||
"iconUrl": "[Relative URL of the icon URL]"
|
||||
},
|
||||
"v1": {
|
||||
"bridgeUrl": "[Bridge URL]"
|
||||
},
|
||||
"v2": {
|
||||
"projectId": "[Project ID]"
|
||||
}
|
||||
},
|
||||
"walletSegue": {
|
||||
"callbackUrl": "[Relative callback URL for WalletSegue, should match apple-app-site-association]"
|
||||
},
|
||||
"images": "[Relative URL for wallet images]",
|
||||
"signTypedDataAction": "dYdX Chain Onboarding",
|
||||
"signTypedDataDomainName": "dYdX Chain"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,474 @@
|
||||
[
|
||||
{
|
||||
"id":"c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96",
|
||||
"name":"MetaMask",
|
||||
"description":"",
|
||||
"homepage":"https://metamask.io/",
|
||||
"chains":[
|
||||
"eip155:1",
|
||||
"eip155:42161",
|
||||
"eip155:43114"
|
||||
],
|
||||
"versions":[
|
||||
"1"
|
||||
],
|
||||
"app":{
|
||||
"browser":"",
|
||||
"ios":"https://apps.apple.com/us/app/metamask/id1438144202",
|
||||
"android":"https://play.google.com/store/apps/details?id=io.metamask",
|
||||
"mac":"",
|
||||
"windows":"",
|
||||
"linux":""
|
||||
},
|
||||
"mobile":{
|
||||
"native":"metamask:",
|
||||
"universal":"https://metamask.app.link"
|
||||
},
|
||||
"desktop":{
|
||||
"native":"",
|
||||
"universal":""
|
||||
},
|
||||
"metadata":{
|
||||
"shortName":"MetaMask",
|
||||
"colors":{
|
||||
"primary":"rgb(255, 255, 255)",
|
||||
"secondary":""
|
||||
}
|
||||
},
|
||||
"config":{
|
||||
"comment":"MetaMask",
|
||||
"iosMinVersion":"0",
|
||||
"imageUrl":"https://v4.testnet.dydx.exchange/wallets/metamask.png",
|
||||
"image":"metamask.png",
|
||||
"encoding":"=\"#%/<>?@\\^`{|}:&",
|
||||
"connections":[
|
||||
{
|
||||
"type":"walletConnectV2",
|
||||
"native":"metamask:",
|
||||
"universal":"https://metamask.app.link"
|
||||
}
|
||||
]
|
||||
},
|
||||
"userFields":{
|
||||
"analyticEvent":"METAMASK"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"coinbase-wallet",
|
||||
"name":"Coinbase Wallet",
|
||||
"description":"",
|
||||
"homepage":"https://www.coinbase.com/wallet",
|
||||
"chains":[
|
||||
"eip155:1"
|
||||
],
|
||||
"versions":[
|
||||
"1"
|
||||
],
|
||||
"app":{
|
||||
"browser":"",
|
||||
"ios":"https://apps.apple.com/us/app/coinbase-wallet-nfts-crypto/id1278383455",
|
||||
"android":"https://play.google.com/store/apps/details?id=org.toshi",
|
||||
"mac":"",
|
||||
"windows":"",
|
||||
"linux":""
|
||||
},
|
||||
"mobile":{
|
||||
"native":"cbwallet:",
|
||||
"universal":""
|
||||
},
|
||||
"desktop":{
|
||||
"native":"",
|
||||
"universal":""
|
||||
},
|
||||
"metadata":{
|
||||
"shortName":"Coinbase",
|
||||
"colors":{
|
||||
"primary":"rgb(255, 255, 255)",
|
||||
"secondary":""
|
||||
}
|
||||
},
|
||||
"config":{
|
||||
"comment":"Coinbase",
|
||||
"iosMinVersion":"1.8.0",
|
||||
"imageUrl":"https://v4.testnet.dydx.exchange/wallets/coinbase-wallet.png",
|
||||
"image":"coinbase-wallet.png",
|
||||
"encoding":"=\"#%/<>?@\\^`{|}:&",
|
||||
"connections":[
|
||||
{
|
||||
"type":"walletSegue",
|
||||
"native":"cbwallet:",
|
||||
"universal":""
|
||||
}
|
||||
]
|
||||
},
|
||||
"userFields":{
|
||||
"analyticEvent":"COINBASE_WALLET"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"9d373b43ad4d2cf190fb1a774ec964a1addf406d6fd24af94ab7596e58c291b2",
|
||||
"name":"imToken",
|
||||
"description":"",
|
||||
"homepage":"https://token.im/",
|
||||
"chains":[
|
||||
"eip155:1"
|
||||
],
|
||||
"versions":[
|
||||
"1"
|
||||
],
|
||||
"app":{
|
||||
"browser":"",
|
||||
"ios":"https://itunes.apple.com/us/app/imtoken2/id1384798940",
|
||||
"android":"https://play.google.com/store/apps/details?id=im.token.app",
|
||||
"mac":"",
|
||||
"windows":"",
|
||||
"linux":""
|
||||
},
|
||||
"mobile":{
|
||||
"native":"imtokenv2:",
|
||||
"universal":""
|
||||
},
|
||||
"desktop":{
|
||||
"native":"",
|
||||
"universal":""
|
||||
},
|
||||
"metadata":{
|
||||
"shortName":"imToken",
|
||||
"colors":{
|
||||
"primary":"rgb(255, 255, 255)",
|
||||
"secondary":""
|
||||
}
|
||||
},
|
||||
"config":{
|
||||
"comment":"imToken",
|
||||
"iosMinVersion":"0",
|
||||
"imageUrl":"https://v4.testnet.dydx.exchange/wallets/imtoken.png",
|
||||
"image":"imtoken.png",
|
||||
"connections":[
|
||||
{
|
||||
"type":"walletConnect",
|
||||
"native":"imtokenv2:",
|
||||
"universal":""
|
||||
}
|
||||
]
|
||||
},
|
||||
"userFields":{
|
||||
"analyticEvent":"IMTOKEN"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0",
|
||||
"name":"Trust Wallet",
|
||||
"description":"",
|
||||
"homepage":"https://trustwallet.com/",
|
||||
"chains":[
|
||||
"eip155:1",
|
||||
"eip155:42161",
|
||||
"eip155:43114"
|
||||
],
|
||||
"versions":[
|
||||
"1"
|
||||
],
|
||||
"app":{
|
||||
"browser":"",
|
||||
"ios":"https://apps.apple.com/app/apple-store/id1288339409",
|
||||
"android":"https://play.google.com/store/apps/details?id=com.wallet.crypto.trustapp",
|
||||
"mac":"",
|
||||
"windows":"",
|
||||
"linux":""
|
||||
},
|
||||
"mobile":{
|
||||
"native":"trust:",
|
||||
"universal":"https://link.trustwallet.com"
|
||||
},
|
||||
"desktop":{
|
||||
"native":"",
|
||||
"universal":""
|
||||
},
|
||||
"metadata":{
|
||||
"shortName":"Trust",
|
||||
"colors":{
|
||||
"primary":"rgb(51, 117, 187)",
|
||||
"secondary":""
|
||||
}
|
||||
},
|
||||
"config":{
|
||||
"comment":"Trust Wallet",
|
||||
"iosMinVersion":"0",
|
||||
"encoding":"=\"#%/<>?@\\^`{|}:&",
|
||||
"imageUrl":"https://v4.testnet.dydx.exchange/wallets/trust-wallet.png",
|
||||
"image":"trust-wallet.png",
|
||||
"connections":[
|
||||
{
|
||||
"type":"walletConnectV2",
|
||||
"native":"trust:",
|
||||
"universal":"https://link.trustwallet.com"
|
||||
}
|
||||
]
|
||||
},
|
||||
"userFields":{
|
||||
"analyticEvent":"TRUST_WALLET"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"Zerion",
|
||||
"name":"Zerion",
|
||||
"description":"",
|
||||
"homepage":"https://zerion.io/",
|
||||
"chains":[
|
||||
"eip155:1"
|
||||
],
|
||||
"versions":[
|
||||
"1"
|
||||
],
|
||||
"app":{
|
||||
"browser":"",
|
||||
"ios":"https://apps.apple.com/app/apple-store/id1456732565",
|
||||
"android":"https://play.google.com/store/apps/details?id=io.zerion.android",
|
||||
"mac":"",
|
||||
"windows":"",
|
||||
"linux":""
|
||||
},
|
||||
"mobile":{
|
||||
"native":"zerion:",
|
||||
"universal":""
|
||||
},
|
||||
"desktop":{
|
||||
"native":"",
|
||||
"universal":""
|
||||
},
|
||||
"metadata":{
|
||||
"shortName":"Zerion",
|
||||
"colors":{
|
||||
"primary":"rgb(51, 117, 187)",
|
||||
"secondary":""
|
||||
}
|
||||
},
|
||||
"config":{
|
||||
"comment":"Zerion Wallet",
|
||||
"iosMinVersion":"0",
|
||||
"encoding":"=\"#%/<>?@\\^`{|}:&",
|
||||
"imageUrl":"https://v4.testnet.dydx.exchange/wallets/zerion.png",
|
||||
"image":"zerion.png",
|
||||
"connections":[
|
||||
{
|
||||
"type":"walletConnectV2",
|
||||
"native":"zerion:",
|
||||
"universal":""
|
||||
}
|
||||
]
|
||||
},
|
||||
"userFields":{
|
||||
"analyticEvent":"ZERION"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"20459438007b75f4f4acb98bf29aa3b800550309646d375da5fd4aac6c2a2c66",
|
||||
"name":"TokenPocket",
|
||||
"description":"",
|
||||
"homepage":"https://tokenpocket.pro/",
|
||||
"chains":[
|
||||
"eip155:1"
|
||||
],
|
||||
"versions":[
|
||||
"1"
|
||||
],
|
||||
"app":{
|
||||
"browser":"",
|
||||
"ios":"https://apps.apple.com/us/app/tokenpocket-trusted-wallet/id1436028697",
|
||||
"android":"https://play.google.com/store/apps/details?id=vip.mytokenpocket",
|
||||
"mac":"",
|
||||
"windows":"",
|
||||
"linux":""
|
||||
},
|
||||
"mobile":{
|
||||
"native":"tpoutside:",
|
||||
"universal":""
|
||||
},
|
||||
"desktop":{
|
||||
"native":"",
|
||||
"universal":""
|
||||
},
|
||||
"metadata":{
|
||||
"shortName":"TokenPocket",
|
||||
"colors":{
|
||||
"primary":"rgb(41, 128, 254)",
|
||||
"secondary":""
|
||||
}
|
||||
},
|
||||
"config":{
|
||||
"comment":"TokenPocket",
|
||||
"iosMinVersion":"0",
|
||||
"imageUrl":"https://v4.testnet.dydx.exchange/wallets/tokenpocket.png",
|
||||
"image":"tokenpocket.png",
|
||||
"connections":[
|
||||
{
|
||||
"type":"walletConnect",
|
||||
"native":"tpoutside:",
|
||||
"universal":""
|
||||
}
|
||||
]
|
||||
},
|
||||
"userFields":{
|
||||
"analyticEvent":"TOKEN_POCKET"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369",
|
||||
"name":"Rainbow",
|
||||
"description":"",
|
||||
"homepage":"https://rainbow.me/",
|
||||
"chains":[
|
||||
"eip155:1"
|
||||
],
|
||||
"versions":[
|
||||
"1"
|
||||
],
|
||||
"app":{
|
||||
"browser":"",
|
||||
"ios":"https://apps.apple.com/us/app/rainbow-ethereum-wallet/id1457119021",
|
||||
"android":"",
|
||||
"mac":"",
|
||||
"windows":"",
|
||||
"linux":""
|
||||
},
|
||||
"mobile":{
|
||||
"native":"rainbow:",
|
||||
"universal":"https://rnbwapp.com"
|
||||
},
|
||||
"desktop":{
|
||||
"native":"",
|
||||
"universal":""
|
||||
},
|
||||
"metadata":{
|
||||
"shortName":"Rainbow",
|
||||
"colors":{
|
||||
"primary":"rgb(0, 30, 89)",
|
||||
"secondary":""
|
||||
}
|
||||
},
|
||||
"config":{
|
||||
"comment":"Rainbow",
|
||||
"iosMinVersion":"0",
|
||||
"encoding":"=\"#%/<>?@\\^`{|}:&",
|
||||
"backlinked":true,
|
||||
"imageUrl":"https://v4.testnet.dydx.exchange/wallets/rainbow-wallet.png",
|
||||
"image":"rainbow-wallet.png",
|
||||
"connections":[
|
||||
{
|
||||
"type":"walletConnectV2",
|
||||
"native":"rainbow:",
|
||||
"universal":"https://rnbwapp.com"
|
||||
}
|
||||
]
|
||||
},
|
||||
"userFields":{
|
||||
"analyticEvent":"RAINBOW_WALLET"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"09102e7bbbd3f92001eda104abe23803181629f695e8f1b95af96d88ff7d5890",
|
||||
"name":"1inch Wallet",
|
||||
"description":"",
|
||||
"homepage":"https://1inch.io/wallet/",
|
||||
"chains":[
|
||||
"eip155:1",
|
||||
"eip155:56"
|
||||
],
|
||||
"versions":[
|
||||
"1"
|
||||
],
|
||||
"app":{
|
||||
"browser":"",
|
||||
"ios":"https://apps.apple.com/us/app/1inch-defi-wallet/id1546049391",
|
||||
"android":"",
|
||||
"mac":"",
|
||||
"windows":"",
|
||||
"linux":""
|
||||
},
|
||||
"mobile":{
|
||||
"native":"oneinch:",
|
||||
"universal":"https://wallet.1inch.io"
|
||||
},
|
||||
"desktop":{
|
||||
"native":"",
|
||||
"universal":""
|
||||
},
|
||||
"metadata":{
|
||||
"shortName":"1inch",
|
||||
"colors":{
|
||||
"primary":"rgb(31, 36, 46)",
|
||||
"secondary":""
|
||||
}
|
||||
},
|
||||
"config":{
|
||||
"comment":"1inch",
|
||||
"iosMinVersion":"0",
|
||||
"encoding":"=\"#%/<>?@\\^`{|}:&",
|
||||
"imageUrl":"https://v4.testnet.dydx.exchange/wallets/1inch.png",
|
||||
"image":"1inch.png",
|
||||
"connections":[
|
||||
{
|
||||
"type":"walletConnect",
|
||||
"native":"oneinch:",
|
||||
"universal":"https://wallet.1inch.io"
|
||||
}
|
||||
]
|
||||
},
|
||||
"userFields":{
|
||||
"analyticEvent":"1INCH"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"bae74827272509a6d63ea25514d9c68ad235c14e45e183518c7ded4572a1b0c4",
|
||||
"name":"Huobi Wallet",
|
||||
"description":"",
|
||||
"homepage":"https://huobiwallet.com/",
|
||||
"chains":[
|
||||
"eip155:1"
|
||||
],
|
||||
"versions":[
|
||||
"1"
|
||||
],
|
||||
"app":{
|
||||
"browser":"",
|
||||
"ios":"https://apps.apple.com/us/app/id1433883012",
|
||||
"android":"https://play.google.com/store/apps/details?id=com.huobionchainwallet.gp",
|
||||
"mac":"",
|
||||
"windows":"",
|
||||
"linux":""
|
||||
},
|
||||
"mobile":{
|
||||
"native":"huobiwallet:",
|
||||
"universal":""
|
||||
},
|
||||
"desktop":{
|
||||
"native":"",
|
||||
"universal":""
|
||||
},
|
||||
"metadata":{
|
||||
"shortName":"Huobi",
|
||||
"colors":{
|
||||
"primary":"rgb(45,101,248)",
|
||||
"secondary":""
|
||||
}
|
||||
},
|
||||
"config":{
|
||||
"comment":"Huobi",
|
||||
"iosMinVersion":"0",
|
||||
"encoding":"=\"#%/<>?@\\^`{|}:&",
|
||||
"imageUrl":"https://v4.testnet.dydx.exchange/wallets/huobi-wallet.png",
|
||||
"image":"huobi-wallet.png",
|
||||
"connections":[
|
||||
{
|
||||
"type":"walletConnect",
|
||||
"native":"huobiwallet:",
|
||||
"universal":""
|
||||
}
|
||||
]
|
||||
},
|
||||
"userFields":{
|
||||
"analyticEvent":"HUOBI_WALLET"
|
||||
}
|
||||
}
|
||||
]
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.8 KiB |
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
source="dist/.well-known/apple-app-site-association"
|
||||
if [ ! -f "$source" ]; then
|
||||
echo "Error: $source file not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
app_id=$IOS_APP_ID
|
||||
if [ -z "$app_id" ]; then
|
||||
echo "Error: IOS_APP_ID is empty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
sed -i '' "s/{PLACE_YOUR_APP_ID_HERE}/$app_id/g" $source
|
||||
else
|
||||
sed -i "s/{PLACE_YOUR_APP_ID_HERE}/$app_id/g" $source
|
||||
fi
|
||||
+1
-3
@@ -67,9 +67,7 @@ const Content = () => {
|
||||
<Route path={AppRoute.Trade} element={<TradePage />} />
|
||||
</Route>
|
||||
<Route path={AppRoute.Markets} element={<MarketsPage />} />
|
||||
{import.meta.env.MODE !== 'production' && (
|
||||
<Route path={AppRoute.Rewards} element={<RewardsPage />} />
|
||||
)}
|
||||
<Route path={AppRoute.Rewards} element={<RewardsPage />} />
|
||||
{isTablet && (
|
||||
<>
|
||||
<Route path={AppRoute.Alerts} element={<AlertsPage />} />
|
||||
|
||||
@@ -8,5 +8,5 @@ export const AVAILABLE_ENVIRONMENTS =
|
||||
|
||||
export const CURRENT_ABACUS_DEPLOYMENT = import.meta.env.MODE === 'production' ? 'TESTNET' : 'DEV';
|
||||
export const ENVIRONMENT_CONFIG_MAP = environments.environments;
|
||||
export type DydxNetwork = keyof typeof ENVIRONMENT_CONFIG_MAP;
|
||||
export type DydxNetwork = (typeof AVAILABLE_ENVIRONMENTS.environments)[number];
|
||||
export const DEFAULT_APP_ENVIRONMENT = AVAILABLE_ENVIRONMENTS.default as DydxNetwork;
|
||||
|
||||
+17
-14
@@ -24,6 +24,8 @@ import {
|
||||
|
||||
import { isMetaMask } from '@/lib/wallet/providers';
|
||||
|
||||
import { DydxNetwork, ENVIRONMENT_CONFIG_MAP } from './networks';
|
||||
|
||||
// Wallet connection types
|
||||
|
||||
export enum WalletConnectionType {
|
||||
@@ -266,7 +268,7 @@ export const wallets: Record<WalletType, WalletConfig> = {
|
||||
walletconnect2Id: '4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0',
|
||||
},
|
||||
[WalletType.WalletConnect2]: {
|
||||
type: WalletType.WalletConnect,
|
||||
type: WalletType.WalletConnect2,
|
||||
stringKey: STRING_KEYS.WALLET_CONNECT_2,
|
||||
icon: WalletConnectIcon,
|
||||
connectionTypes: [WalletConnectionType.WalletConnect2],
|
||||
@@ -318,20 +320,21 @@ export type WalletConnection = {
|
||||
export const COSMOS_DERIVATION_PATH = "m/44'/118'/0'/0/0";
|
||||
|
||||
/**
|
||||
* @description typed data to sign for v4 onboarding
|
||||
* @description typed data to sign for dYdX Chain onboarding
|
||||
*/
|
||||
export const SIGN_TYPED_DATA = {
|
||||
primaryType: 'dYdX',
|
||||
domain: {
|
||||
name: 'dYdX V4',
|
||||
},
|
||||
types: {
|
||||
dYdX: [{ name: 'action', type: 'string' }],
|
||||
},
|
||||
message: {
|
||||
action: 'dYdX V4 Onboarding',
|
||||
},
|
||||
} as const;
|
||||
export const getSignTypedData = (selectedNetwork: DydxNetwork) =>
|
||||
({
|
||||
primaryType: 'dYdX',
|
||||
domain: {
|
||||
name: ENVIRONMENT_CONFIG_MAP[selectedNetwork].wallets.signTypedDataDomainName,
|
||||
},
|
||||
types: {
|
||||
dYdX: [{ name: 'action', type: 'string' }],
|
||||
},
|
||||
message: {
|
||||
action: ENVIRONMENT_CONFIG_MAP[selectedNetwork].wallets.signTypedDataAction,
|
||||
},
|
||||
} as const);
|
||||
|
||||
export type PrivateInformation = ReturnType<typeof onboarding.deriveHDKeyFromEthereumSignature>;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import { useLocalStorage } from '@/hooks';
|
||||
import { initializeLocalization } from '@/state/app';
|
||||
|
||||
import abacusStateManager from '@/lib/abacus';
|
||||
import { validateAgainstAvailableEnvironments } from '@/lib/network';
|
||||
|
||||
export const useInitializePage = () => {
|
||||
const dispatch = useDispatch();
|
||||
@@ -18,6 +19,7 @@ export const useInitializePage = () => {
|
||||
const [localStorageNetwork] = useLocalStorage<DydxNetwork>({
|
||||
key: LocalStorageKey.SelectedNetwork,
|
||||
defaultValue: DEFAULT_APP_ENVIRONMENT,
|
||||
validateFn: validateAgainstAvailableEnvironments,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -9,6 +9,8 @@ import { useAccounts, useLocalStorage } from '@/hooks';
|
||||
import { setSelectedNetwork } from '@/state/app';
|
||||
import { getSelectedNetwork } from '@/state/appSelectors';
|
||||
|
||||
import { validateAgainstAvailableEnvironments } from '@/lib/network';
|
||||
|
||||
export const useSelectedNetwork = (): {
|
||||
switchNetwork: (network: DydxNetwork) => void;
|
||||
selectedNetwork: DydxNetwork;
|
||||
@@ -20,6 +22,7 @@ export const useSelectedNetwork = (): {
|
||||
const [, setLocalStorageNetwork] = useLocalStorage<DydxNetwork>({
|
||||
key: LocalStorageKey.SelectedNetwork,
|
||||
defaultValue: DEFAULT_APP_ENVIRONMENT,
|
||||
validateFn: validateAgainstAvailableEnvironments,
|
||||
});
|
||||
|
||||
const switchNetwork = useCallback(
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
import environments from '../../../public/configs/env.json';
|
||||
|
||||
import { validateAgainstAvailableEnvironments } from '../network';
|
||||
|
||||
describe('validateAgainstAvailableEnvironments', () => {
|
||||
describe('production environment', () => {
|
||||
beforeAll(() => {
|
||||
jest.mock('../../constants/networks', () => ({
|
||||
AVAILABLE_ENVIRONMENTS: {
|
||||
environments: [],
|
||||
default: 'dydxprotocol-testnet-dydx',
|
||||
}, //environments.deployments.TESTNET,
|
||||
}));
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
jest.unmock('../../constants/networks');
|
||||
});
|
||||
|
||||
it('Returns true for valid environments', () => {
|
||||
expect(validateAgainstAvailableEnvironments('dydxprotocol-testnet-dydx')).toEqual(true);
|
||||
});
|
||||
|
||||
it('Returns false for invalid environments', () => {
|
||||
expect(validateAgainstAvailableEnvironments('dydxprotocol-dev')).toEqual(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('staging environment', () => {
|
||||
it('Returns true for valid environments', () => {
|
||||
expect(validateAgainstAvailableEnvironments('dydxprotocol-dev')).toEqual(true);
|
||||
});
|
||||
|
||||
it('Returns false for invalid environments', () => {
|
||||
expect(validateAgainstAvailableEnvironments('INVALID')).toEqual(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -45,11 +45,15 @@ describe('getStringsForDateTimeDiff', () => {
|
||||
|
||||
describe('getStringsForTimeInterval', () => {
|
||||
it.each([
|
||||
[Duration.fromObject({ months: 2 }), '2', 'MONTHS_ABBREVIATED'],
|
||||
[Duration.fromObject({ weeks: 3, days: 2 }), '3', 'WEEKS_ABBREVIATED'],
|
||||
[Duration.fromObject({ days: 5, hours: 12 }), '6', 'DAYS_ABBREVIATED'],
|
||||
[Duration.fromObject({ hours: 8, minutes: 30 }), '9', 'HOURS_ABBREVIATED'],
|
||||
[Duration.fromObject({ minutes: 45 }), '45', 'MINUTES_ABBREVIATED'],
|
||||
[Duration.fromObject({ months: 2 }), '2', 'APP.GENERAL.TIME_STRINGS.MONTHS_ABBREVIATED'],
|
||||
[Duration.fromObject({ weeks: 3, days: 2 }), '3', 'APP.GENERAL.TIME_STRINGS.WEEKS_ABBREVIATED'],
|
||||
[Duration.fromObject({ days: 5, hours: 12 }), '6', 'APP.GENERAL.TIME_STRINGS.DAYS_ABBREVIATED'],
|
||||
[
|
||||
Duration.fromObject({ hours: 8, minutes: 30 }),
|
||||
'9',
|
||||
'APP.GENERAL.TIME_STRINGS.HOURS_ABBREVIATED',
|
||||
],
|
||||
[Duration.fromObject({ minutes: 45 }), '45', 'APP.GENERAL.TIME_STRINGS.MINUTES_ABBREVIATED'],
|
||||
])(
|
||||
'returns the correct timeString and unitStringKey',
|
||||
(timeInterval, expectedTimeString, expectedUnitStringKey) => {
|
||||
@@ -35,6 +35,7 @@ import { setAssets } from '@/state/assets';
|
||||
import { setConfigs } from '@/state/configs';
|
||||
import { setInputs } from '@/state/inputs';
|
||||
import { setHistoricalFundings, setLiveTrades, setMarkets, setOrderbook } from '@/state/perpetuals';
|
||||
import { isTruthy } from '../isTruthy';
|
||||
|
||||
class AbacusStateNotifier implements AbacusStateNotificationProtocol {
|
||||
private store: RootStore | undefined;
|
||||
@@ -84,7 +85,7 @@ class AbacusStateNotifier implements AbacusStateNotificationProtocol {
|
||||
dispatch(setBalances(balances));
|
||||
}
|
||||
if (updatedState.account?.stakingBalances) {
|
||||
const stakingBalances: Record<string, AccountBalance> = {}
|
||||
const stakingBalances: Record<string, AccountBalance> = {};
|
||||
for (const { k, v } of updatedState.account.stakingBalances.toArray()) {
|
||||
stakingBalances[k] = v;
|
||||
}
|
||||
@@ -108,10 +109,12 @@ class AbacusStateNotifier implements AbacusStateNotificationProtocol {
|
||||
dispatch(
|
||||
setMarkets({
|
||||
markets: Object.fromEntries(
|
||||
(marketIds || updatedState.marketIds()?.toArray() || []).map((marketId: string) => {
|
||||
const marketData = updatedState.market(marketId);
|
||||
return [marketId, marketData];
|
||||
})
|
||||
(marketIds || updatedState.marketIds()?.toArray() || [])
|
||||
.map((marketId: string) => {
|
||||
const marketData = updatedState.market(marketId);
|
||||
return [marketId, marketData];
|
||||
})
|
||||
.filter(isTruthy)
|
||||
) as Record<string, PerpetualMarket>,
|
||||
update: !!marketIds,
|
||||
})
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import { AVAILABLE_ENVIRONMENTS, type DydxNetwork } from '@/constants/networks';
|
||||
|
||||
export const validateAgainstAvailableEnvironments = (value: DydxNetwork) =>
|
||||
AVAILABLE_ENVIRONMENTS.environments.includes(value);
|
||||
@@ -10,7 +10,7 @@ export const getTimestamp = (value?: BigNumberish | null) =>
|
||||
? value
|
||||
: typeof value === 'string'
|
||||
? new Date(value).getTime()
|
||||
: new Date(value.toString()).getTime()
|
||||
: new Date(value.toNumber()).getTime()
|
||||
: undefined;
|
||||
|
||||
export const getStringsForDateTimeDiff = (dateTime: DateTime) => {
|
||||
@@ -77,4 +77,4 @@ export const formatSeconds = (seconds: number) => {
|
||||
const minutes = Math.floor(seconds / 60);
|
||||
const remainingSeconds = seconds % 60;
|
||||
return `${getTimeString(minutes)}:${getTimeString(remainingSeconds)}`;
|
||||
}
|
||||
};
|
||||
|
||||
+2
-3
@@ -100,11 +100,10 @@ const walletconnect2ConnectorOptions: ConstructorParameters<typeof WalletConnect
|
||||
options: {
|
||||
projectId: import.meta.env.VITE_WALLETCONNECT2_PROJECT_ID,
|
||||
metadata: {
|
||||
// TODO: update to local URLs/images
|
||||
name: 'dYdX',
|
||||
description: '',
|
||||
url: 'https://trade.dydx.exchange',
|
||||
icons: ['https://trade.dydx.exchange/cbw-image.png'],
|
||||
url: import.meta.env.VITE_BASE_URL,
|
||||
icons: [`${import.meta.env.VITE_BASE_URL}/cbw-image.png}`],
|
||||
},
|
||||
showQrModal: true,
|
||||
qrModalOptions: {
|
||||
|
||||
@@ -6,6 +6,7 @@ import { LocalStorageKey } from '@/constants/localStorage';
|
||||
import { DEFAULT_APP_ENVIRONMENT, type DydxNetwork } from '@/constants/networks';
|
||||
|
||||
import { getLocalStorage } from '@/lib/localStorage';
|
||||
import { validateAgainstAvailableEnvironments } from '@/lib/network';
|
||||
|
||||
export interface AppState {
|
||||
apiState: AbacusApiState | undefined;
|
||||
@@ -19,6 +20,7 @@ const initialState: AppState = {
|
||||
selectedNetwork: getLocalStorage({
|
||||
key: LocalStorageKey.SelectedNetwork,
|
||||
defaultValue: DEFAULT_APP_ENVIRONMENT,
|
||||
validateFn: validateAgainstAvailableEnvironments,
|
||||
}),
|
||||
};
|
||||
|
||||
|
||||
@@ -139,11 +139,9 @@ export const MarketDetails: React.FC = () => {
|
||||
</Styled.WrapRow>
|
||||
|
||||
<Styled.MarketDescription>
|
||||
{primaryDescriptionKey && (
|
||||
<p>{stringGetter({ key: STRING_KEYS[primaryDescriptionKey as StringKey] })}</p>
|
||||
)}
|
||||
{primaryDescriptionKey && <p>{stringGetter({ key: `APP.${primaryDescriptionKey}` })}</p>}
|
||||
{secondaryDescriptionKey && (
|
||||
<p>{stringGetter({ key: STRING_KEYS[secondaryDescriptionKey as StringKey] })}</p>
|
||||
<p>{stringGetter({ key: `APP.${secondaryDescriptionKey}` })}</p>
|
||||
)}
|
||||
</Styled.MarketDescription>
|
||||
|
||||
|
||||
@@ -53,6 +53,15 @@ export const TransferStatusToast = ({
|
||||
|
||||
if (!status) return <LoadingDots size={3} />;
|
||||
|
||||
const statusString =
|
||||
type === 'deposit'
|
||||
? status?.squidTransactionStatus === 'success'
|
||||
? STRING_KEYS.DEPOSIT_COMPLETE
|
||||
: STRING_KEYS.DEPOSIT_STATUS
|
||||
: status?.squidTransactionStatus === 'success'
|
||||
? STRING_KEYS.WITHDRAW_COMPLETE
|
||||
: STRING_KEYS.WITHDRAW_STATUS;
|
||||
|
||||
return (
|
||||
<Styled.Root open={open} onOpenChange={setOpen}>
|
||||
<WithReceipt
|
||||
@@ -67,7 +76,7 @@ export const TransferStatusToast = ({
|
||||
<Styled.BridgingStatus>
|
||||
<Styled.Status>
|
||||
{stringGetter({
|
||||
key: type === 'deposit' ? STRING_KEYS.DEPOSIT_STATUS : STRING_KEYS.WITHDRAW_STATUS,
|
||||
key: statusString,
|
||||
params: {
|
||||
AMOUNT_USD: <Styled.InlineOutput type={OutputType.Fiat} value={toAmount} />,
|
||||
ESTIMATED_DURATION: (
|
||||
|
||||
@@ -51,7 +51,7 @@ export const TransferStatusSteps = ({ status }: ElementProps) => {
|
||||
label: stringGetter({
|
||||
key: type === 'deposit' ? STRING_KEYS.DEPOSIT_TO_CHAIN : STRING_KEYS.WITHDRAW_TO_CHAIN,
|
||||
params: {
|
||||
CHAIN: status?.toChain?.chainData?.chainName,
|
||||
CHAIN: type === 'deposit' ? 'dYdX' : status?.toChain?.chainData?.chainName,
|
||||
},
|
||||
}),
|
||||
step: TransferStatusStep.ToChain,
|
||||
|
||||
@@ -27,9 +27,9 @@ export const DisconnectDialog = ({ setIsOpen }: ElementProps) => {
|
||||
};
|
||||
|
||||
return (
|
||||
<Dialog isOpen setIsOpen={setIsOpen} title="Disconnect">
|
||||
<Dialog isOpen setIsOpen={setIsOpen} title={stringGetter({ key: STRING_KEYS.DISCONNECT })}>
|
||||
<Styled.Content>
|
||||
<p>Are you sure you want to disconnect your account?</p>
|
||||
<p>{stringGetter({ key: STRING_KEYS.DISCONNECT_CONFIRMATION })}</p>
|
||||
<Styled.ButtonRow>
|
||||
<Close asChild>
|
||||
<Button action={ButtonAction.Destroy} onClick={disconnect}>
|
||||
|
||||
@@ -19,7 +19,7 @@ import { useDisplayedWallets } from '@/hooks/useDisplayedWallets';
|
||||
import { breakpoints } from '@/styles';
|
||||
import { layoutMixins } from '@/styles/layoutMixins';
|
||||
|
||||
const aboutWalletsLink = `https://www.dydxacademy.info/educational-video-series/onboarding-to-defi-with-dydx`;
|
||||
const aboutWalletsLink = `https://www.dydx.academy/video/defi-wallet`;
|
||||
|
||||
export const ChooseWallet = () => {
|
||||
const stringGetter = useStringGetter();
|
||||
@@ -34,7 +34,14 @@ export const ChooseWallet = () => {
|
||||
<Styled.AlertMessage type={AlertType.Error}>
|
||||
{
|
||||
<h4>
|
||||
Couldn't connect to {stringGetter({ key: wallets[selectedWalletType].stringKey })}.
|
||||
{stringGetter({
|
||||
key: STRING_KEYS.COULD_NOT_CONNECT,
|
||||
params: {
|
||||
WALLET: stringGetter({
|
||||
key: wallets[selectedWalletType].stringKey,
|
||||
}),
|
||||
},
|
||||
})}
|
||||
</h4>
|
||||
}
|
||||
{selectedWalletError}
|
||||
|
||||
@@ -10,7 +10,7 @@ import { AnalyticsEvent } from '@/constants/analytics';
|
||||
import { ButtonAction } from '@/constants/buttons';
|
||||
import { STRING_KEYS } from '@/constants/localization';
|
||||
import { ENVIRONMENT_CONFIG_MAP } from '@/constants/networks';
|
||||
import { DydxAddress, SIGN_TYPED_DATA } from '@/constants/wallets';
|
||||
import { DydxAddress, getSignTypedData } from '@/constants/wallets';
|
||||
|
||||
import { useAccounts, useBreakpoints, useDydxClient, useStringGetter } from '@/hooks';
|
||||
import { useMatchingEvmNetwork } from '@/hooks/useMatchingEvmNetwork';
|
||||
@@ -85,10 +85,11 @@ export const GenerateKeys = ({
|
||||
EvmDerivedAccountStatus.Derived,
|
||||
].includes(status);
|
||||
|
||||
const signTypedData = getSignTypedData(selectedNetwork);
|
||||
const { signTypedDataAsync } = useSignTypedData({
|
||||
...SIGN_TYPED_DATA,
|
||||
...signTypedData,
|
||||
domain: {
|
||||
...SIGN_TYPED_DATA.domain,
|
||||
...signTypedData.domain,
|
||||
chainId,
|
||||
},
|
||||
});
|
||||
@@ -165,8 +166,8 @@ export const GenerateKeys = ({
|
||||
{[
|
||||
{
|
||||
status: EvmDerivedAccountStatus.Deriving,
|
||||
title: stringGetter({ key: STRING_KEYS.GENERATE_COSMOS_WALLET }),
|
||||
description: stringGetter({ key: STRING_KEYS.GENERATE_COSMOS_WALLET }),
|
||||
title: stringGetter({ key: STRING_KEYS.GENERATE_DYDX_WALLET }),
|
||||
description: stringGetter({ key: STRING_KEYS.VERIFY_WALLET_OWNERSHIP }),
|
||||
},
|
||||
status === EvmDerivedAccountStatus.EnsuringDeterminism && {
|
||||
status: EvmDerivedAccountStatus.EnsuringDeterminism,
|
||||
|
||||
@@ -168,6 +168,19 @@ export const DepositButtonAndReceipt = ({
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
key: 'estimatedRouteDuration',
|
||||
label: <span>{stringGetter({ key: STRING_KEYS.ESTIMATED_TIME })}</span>,
|
||||
value: typeof summary?.estimatedRouteDuration === 'number' && (
|
||||
<Output
|
||||
type={OutputType.Text}
|
||||
value={stringGetter({
|
||||
key: STRING_KEYS.X_MINUTES_LOWERCASED,
|
||||
params: { X: Math.round(summary?.estimatedRouteDuration / 60) },
|
||||
})}
|
||||
/>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
const isFormValid = !isDisabled && !isEditingSlippage;
|
||||
|
||||
@@ -4,6 +4,7 @@ import styled, { type AnyStyledComponent } from 'styled-components';
|
||||
import type { NumberFormatValues } from 'react-number-format';
|
||||
import { shallowEqual, useSelector } from 'react-redux';
|
||||
import { TESTNET_CHAIN_ID } from '@dydxprotocol/v4-client-js';
|
||||
import { isAddress } from 'viem';
|
||||
|
||||
import { TransferInputField, TransferInputTokenResource, TransferType } from '@/constants/abacus';
|
||||
import { AlertType } from '@/constants/alerts';
|
||||
@@ -26,6 +27,7 @@ import { Link } from '@/components/Link';
|
||||
import { OutputType } from '@/components/Output';
|
||||
import { Tag } from '@/components/Tag';
|
||||
import { WithDetailsReceipt } from '@/components/WithDetailsReceipt';
|
||||
import { Icon, IconName } from '@/components/Icon';
|
||||
|
||||
import { ChainSelectMenu } from '@/views/forms/AccountManagementForms/ChainSelectMenu';
|
||||
|
||||
@@ -59,6 +61,8 @@ export const WithdrawForm = () => {
|
||||
resources,
|
||||
} = useSelector(getTransferInputs, shallowEqual) || {};
|
||||
|
||||
const isValidAddress = toAddress && isAddress(toAddress);
|
||||
|
||||
const toToken = useMemo(
|
||||
() => (token ? resources?.tokenResources?.get(token) : undefined),
|
||||
[token, resources]
|
||||
@@ -179,7 +183,6 @@ export const WithdrawForm = () => {
|
||||
|
||||
const onSelectChain = useCallback((chain: string) => {
|
||||
if (chain) {
|
||||
abacusStateManager.clearTransferInputValues();
|
||||
abacusStateManager.setTransferValue({
|
||||
field: TransferInputField.chain,
|
||||
value: chain,
|
||||
@@ -190,7 +193,6 @@ export const WithdrawForm = () => {
|
||||
|
||||
const onSelectToken = useCallback((token: TransferInputTokenResource) => {
|
||||
if (token) {
|
||||
abacusStateManager.clearTransferInputValues();
|
||||
abacusStateManager.setTransferValue({
|
||||
field: TransferInputField.token,
|
||||
value: token.address,
|
||||
@@ -265,7 +267,12 @@ export const WithdrawForm = () => {
|
||||
placeholder={stringGetter({ key: STRING_KEYS.ADDRESS })}
|
||||
onChange={onChangeAddress}
|
||||
value={toAddress || ''}
|
||||
label={stringGetter({ key: STRING_KEYS.DESTINATION })}
|
||||
label={
|
||||
<span>
|
||||
{stringGetter({ key: STRING_KEYS.DESTINATION })}{' '}
|
||||
{isValidAddress ? <Styled.CheckIcon iconName={IconName.Check} /> : null}
|
||||
</span>
|
||||
}
|
||||
/>
|
||||
<ChainSelectMenu
|
||||
label={stringGetter({ key: STRING_KEYS.NETWORK })}
|
||||
@@ -342,3 +349,10 @@ Styled.TransactionInfo = styled.span`
|
||||
Styled.FormInputButton = styled(Button)`
|
||||
${formMixins.inputInnerButton}
|
||||
`;
|
||||
|
||||
Styled.CheckIcon = styled(Icon)`
|
||||
margin: 0 1ch;
|
||||
|
||||
color: var(--color-positive);
|
||||
font-size: 0.625rem;
|
||||
`;
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
import { useState } from 'react';
|
||||
import { shallowEqual, useSelector } from 'react-redux';
|
||||
import styled, { type AnyStyledComponent } from 'styled-components';
|
||||
import { formatUnits } from 'viem';
|
||||
|
||||
import { TransferInputTokenResource } from '@/constants/abacus';
|
||||
import { ButtonAction, ButtonShape, ButtonSize, ButtonType } from '@/constants/buttons';
|
||||
import { STRING_KEYS } from '@/constants/localization';
|
||||
import { NumberSign } from '@/constants/numbers';
|
||||
|
||||
import { formatSeconds } from '@/lib/timeUtils';
|
||||
|
||||
import { layoutMixins } from '@/styles/layoutMixins';
|
||||
|
||||
import { useStringGetter } from '@/hooks';
|
||||
import { useAccountBalance } from '@/hooks/useAccountBalance';
|
||||
import { layoutMixins } from '@/styles/layoutMixins';
|
||||
|
||||
import { Button } from '@/components/Button';
|
||||
|
||||
@@ -16,6 +21,7 @@ import { Details, DetailsItem } from '@/components/Details';
|
||||
import { DiffOutput } from '@/components/DiffOutput';
|
||||
import { Icon, IconName } from '@/components/Icon';
|
||||
import { Output, OutputType } from '@/components/Output';
|
||||
import { Tag } from '@/components/Tag';
|
||||
import { ToggleButton } from '@/components/ToggleButton';
|
||||
import { WithReceipt } from '@/components/WithReceipt';
|
||||
|
||||
@@ -49,22 +55,14 @@ export const WithdrawButtonAndReceipt = ({
|
||||
const [isEditingSlippage, setIsEditingSlipapge] = useState(false);
|
||||
const stringGetter = useStringGetter();
|
||||
|
||||
// TODO: uncomment when we have a way to get token amount estimate from abacus
|
||||
// const { balance, queryStatus } = useAccountBalance({
|
||||
// addressOrDenom: withdrawToken?.address || undefined,
|
||||
// assetSymbol: withdrawToken?.symbol || undefined,
|
||||
// chainId: withdrawChain ? parseInt(withdrawChain) : undefined,
|
||||
// decimals: withdrawToken?.decimals || undefined,
|
||||
// isCosmosChain: false,
|
||||
// });
|
||||
|
||||
// const balanceBN = MustBigNumber(balance);
|
||||
// const newBalance =
|
||||
// // toAmountMin && withdrawToken && parseUnits(toAmountMin, withdrawToken.decimals).toString();
|
||||
|
||||
const { leverage } = useSelector(getSubaccount, shallowEqual) || {};
|
||||
const { summary, requestPayload } = useSelector(getTransferInputs, shallowEqual) || {};
|
||||
|
||||
const toAmount =
|
||||
summary?.toAmount &&
|
||||
withdrawToken?.decimals &&
|
||||
formatUnits(BigInt(summary.toAmount), withdrawToken?.decimals);
|
||||
|
||||
const feeSubitems: DetailsItem[] = [];
|
||||
|
||||
if (typeof summary?.gasFee === 'number') {
|
||||
@@ -98,9 +96,27 @@ export const WithdrawButtonAndReceipt = ({
|
||||
),
|
||||
subitems: feeSubitems,
|
||||
},
|
||||
{
|
||||
key: 'wallet',
|
||||
label: (
|
||||
<span>
|
||||
{stringGetter({ key: STRING_KEYS.AMOUNT_RECEIVED })}{' '}
|
||||
{withdrawToken && <Tag>{withdrawToken?.symbol}</Tag>}
|
||||
</span>
|
||||
),
|
||||
value: (
|
||||
<Styled.DiffOutput
|
||||
type={OutputType.Asset}
|
||||
value={'0'}
|
||||
newValue={toAmount}
|
||||
sign={NumberSign.Positive}
|
||||
withDiff={Boolean(toAmount)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
key: 'leverage',
|
||||
label: <span>{stringGetter({ key: STRING_KEYS.LEVERAGE })}</span>,
|
||||
label: <span>{stringGetter({ key: STRING_KEYS.ACCOUNT_LEVERAGE })}</span>,
|
||||
value: (
|
||||
<Styled.DiffOutput
|
||||
type={OutputType.Multiple}
|
||||
@@ -137,25 +153,19 @@ export const WithdrawButtonAndReceipt = ({
|
||||
/>
|
||||
),
|
||||
},
|
||||
// TODO: uncomment when we have a way to get token amount estimate from abacus
|
||||
// {
|
||||
// key: 'wallet',
|
||||
// label: (
|
||||
// <span>
|
||||
// {stringGetter({ key: STRING_KEYS.WALLET })}{' '}
|
||||
// {withdrawToken && <Tag>{withdrawToken?.symbol}</Tag>}
|
||||
// </span>
|
||||
// ),
|
||||
// value: (
|
||||
// <Styled.DiffOutput
|
||||
// type={OutputType.Asset}
|
||||
// value={balanceBN?.toString()}
|
||||
// newValue={newBalance}
|
||||
// sign={NumberSign.Negative}
|
||||
// withDiff={Boolean(balance !== newBalance)}
|
||||
// />
|
||||
// ),
|
||||
// },
|
||||
{
|
||||
key: 'estimatedRouteDuration',
|
||||
label: <span>{stringGetter({ key: STRING_KEYS.ESTIMATED_TIME })}</span>,
|
||||
value: typeof summary?.estimatedRouteDuration === 'number' && (
|
||||
<Output
|
||||
type={OutputType.Text}
|
||||
value={stringGetter({
|
||||
key: STRING_KEYS.X_MINUTES_LOWERCASED,
|
||||
params: { X: Math.round(summary?.estimatedRouteDuration / 60) },
|
||||
})}
|
||||
/>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
const isFormValid = !isDisabled && !isEditingSlippage;
|
||||
|
||||
@@ -6,7 +6,7 @@ import { layoutMixins } from '@/styles/layoutMixins';
|
||||
import { formMixins } from '@/styles/formMixins';
|
||||
|
||||
import { TradeInputField } from '@/constants/abacus';
|
||||
import { STRING_KEYS } from '@/constants/localization';
|
||||
import { STRING_KEYS, StringKey } from '@/constants/localization';
|
||||
import { INTEGER_DECIMALS } from '@/constants/numbers';
|
||||
import { TimeUnitShort } from '@/constants/time';
|
||||
import { GOOD_TIL_TIME_TIMESCALE_STRINGS } from '@/constants/trade';
|
||||
@@ -29,12 +29,12 @@ export const AdvancedTradeOptions = () => {
|
||||
const currentTradeFormConfig = useSelector(getInputTradeOptions, shallowEqual);
|
||||
const inputTradeData = useSelector(getInputTradeData, shallowEqual);
|
||||
|
||||
const { execution, goodUntil, postOnly, reduceOnly, timeInForce } = inputTradeData || {};
|
||||
const { execution, goodTil, postOnly, reduceOnly, timeInForce } = inputTradeData || {};
|
||||
|
||||
const { executionOptions, needsGoodUntil, needsPostOnly, needsReduceOnly, timeInForceOptions } =
|
||||
currentTradeFormConfig || {};
|
||||
|
||||
const { duration, unit } = goodUntil || {};
|
||||
const { duration, unit } = goodTil || {};
|
||||
|
||||
const needsExecution = executionOptions || needsPostOnly || needsReduceOnly;
|
||||
|
||||
@@ -62,7 +62,7 @@ export const AdvancedTradeOptions = () => {
|
||||
<Styled.SelectItem
|
||||
key={type}
|
||||
value={type}
|
||||
label={stringGetter({ key: stringKey })}
|
||||
label={stringGetter({ key: stringKey as StringKey })}
|
||||
/>
|
||||
))}
|
||||
</Styled.SelectMenu>
|
||||
@@ -76,7 +76,7 @@ export const AdvancedTradeOptions = () => {
|
||||
onChange={({ value }: NumberFormatValues) => {
|
||||
abacusStateManager.setTradeValue({
|
||||
value: Number(value),
|
||||
field: TradeInputField.goodUntilDuration,
|
||||
field: TradeInputField.goodTilDuration,
|
||||
});
|
||||
}}
|
||||
value={duration ?? ''}
|
||||
@@ -86,7 +86,7 @@ export const AdvancedTradeOptions = () => {
|
||||
onValueChange={(goodTilTimeTimescale: string) => {
|
||||
abacusStateManager.setTradeValue({
|
||||
value: goodTilTimeTimescale,
|
||||
field: TradeInputField.goodUntilUnit,
|
||||
field: TradeInputField.goodTilUnit,
|
||||
});
|
||||
}}
|
||||
>
|
||||
@@ -121,7 +121,7 @@ export const AdvancedTradeOptions = () => {
|
||||
<Styled.SelectItem
|
||||
key={type}
|
||||
value={type}
|
||||
label={stringGetter({ key: stringKey })}
|
||||
label={stringGetter({ key: stringKey as StringKey })}
|
||||
/>
|
||||
))}
|
||||
</Styled.SelectMenu>
|
||||
|
||||
Reference in New Issue
Block a user