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 }}
|
AMPLITUDE_API_KEY: ${{ secrets.AMPLITUDE_API_KEY }}
|
||||||
BUGSNAG_API_KEY: ${{ secrets.BUGSNAG_API_KEY }}
|
BUGSNAG_API_KEY: ${{ secrets.BUGSNAG_API_KEY }}
|
||||||
STATUS_PAGE_SCRIPT_URI: ${{ secrets.STATUS_PAGE_SCRIPT_URI }}
|
STATUS_PAGE_SCRIPT_URI: ${{ secrets.STATUS_PAGE_SCRIPT_URI }}
|
||||||
|
IOS_APP_ID: ${{ secrets.IOS_APP_ID }}
|
||||||
run: |
|
run: |
|
||||||
pnpm run build
|
pnpm run build
|
||||||
pnpm run build:inject-amplitude
|
pnpm run build:inject-amplitude
|
||||||
pnpm run build:inject-bugsnag
|
pnpm run build:inject-bugsnag
|
||||||
pnpm run build:inject-statuspage
|
pnpm run build:inject-statuspage
|
||||||
|
sh scripts/inject-app-deeplinks.sh
|
||||||
|
|
||||||
- name: Upload to IPFS via web3.storage
|
- name: Upload to IPFS via web3.storage
|
||||||
uses: dydxprotocol/add-to-web3@v1
|
uses: dydxprotocol/add-to-web3@v1
|
||||||
|
|||||||
+3
-2
@@ -10,6 +10,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
|
"build:inject-app-deeplinks": "sh scripts/inject-app-deeplinks.sh",
|
||||||
"build:inject-amplitude": "node scripts/inject-amplitude.js",
|
"build:inject-amplitude": "node scripts/inject-amplitude.js",
|
||||||
"build:inject-bugsnag": "node scripts/inject-bugsnag.js",
|
"build:inject-bugsnag": "node scripts/inject-bugsnag.js",
|
||||||
"build:inject-statuspage": "node scripts/inject-statuspage.js",
|
"build:inject-statuspage": "node scripts/inject-statuspage.js",
|
||||||
@@ -37,9 +38,9 @@
|
|||||||
"@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": "^0.6.3",
|
"@dydxprotocol/v4-abacus": "^0.6.4",
|
||||||
"@dydxprotocol/v4-client-js": "^0.36.1",
|
"@dydxprotocol/v4-client-js": "^0.36.1",
|
||||||
"@dydxprotocol/v4-localization": "^0.1.23",
|
"@dydxprotocol/v4-localization": "^0.1.28",
|
||||||
"@ethersproject/providers": "^5.7.2",
|
"@ethersproject/providers": "^5.7.2",
|
||||||
"@js-joda/core": "^5.5.3",
|
"@js-joda/core": "^5.5.3",
|
||||||
"@radix-ui/react-collapsible": "^1.0.3",
|
"@radix-ui/react-collapsible": "^1.0.3",
|
||||||
|
|||||||
Generated
+12
-12
@@ -1,9 +1,5 @@
|
|||||||
lockfileVersion: '6.0'
|
lockfileVersion: '6.0'
|
||||||
|
|
||||||
settings:
|
|
||||||
autoInstallPeers: true
|
|
||||||
excludeLinksFromLockfile: false
|
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
'@0xsquid/sdk':
|
'@0xsquid/sdk':
|
||||||
specifier: ^1.10.0
|
specifier: ^1.10.0
|
||||||
@@ -27,14 +23,14 @@ dependencies:
|
|||||||
specifier: ^0.31.0
|
specifier: ^0.31.0
|
||||||
version: 0.31.0
|
version: 0.31.0
|
||||||
'@dydxprotocol/v4-abacus':
|
'@dydxprotocol/v4-abacus':
|
||||||
specifier: ^0.6.3
|
specifier: ^0.6.4
|
||||||
version: 0.6.3
|
version: 0.6.4
|
||||||
'@dydxprotocol/v4-client-js':
|
'@dydxprotocol/v4-client-js':
|
||||||
specifier: ^0.36.1
|
specifier: ^0.36.1
|
||||||
version: 0.36.1
|
version: 0.36.1
|
||||||
'@dydxprotocol/v4-localization':
|
'@dydxprotocol/v4-localization':
|
||||||
specifier: ^0.1.23
|
specifier: ^0.1.28
|
||||||
version: 0.1.23
|
version: 0.1.28
|
||||||
'@ethersproject/providers':
|
'@ethersproject/providers':
|
||||||
specifier: ^5.7.2
|
specifier: ^5.7.2
|
||||||
version: 5.7.2
|
version: 5.7.2
|
||||||
@@ -979,8 +975,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-RpfLEtTlyIxeNPGKcokS+p3BZII/Q3bYxryFRglh5H3A3T8q9fsLYm72VYAMEOOIBLEa8o93kFLiBDUWKrwXZA==}
|
resolution: {integrity: sha512-RpfLEtTlyIxeNPGKcokS+p3BZII/Q3bYxryFRglh5H3A3T8q9fsLYm72VYAMEOOIBLEa8o93kFLiBDUWKrwXZA==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@dydxprotocol/v4-abacus@0.6.3:
|
/@dydxprotocol/v4-abacus@0.6.4:
|
||||||
resolution: {integrity: sha512-oYMbII7o7fXjNpl2PZpG6mwKQ49e8Qky5vA8Ua9boNs7nRUx3PC6azfoPtjHKMdYY33eHoXcZBpTynhneLXCVg==}
|
resolution: {integrity: sha512-eH+/9Q/OnQtwzBwM1BJyXybFPdivGmFQWrxM71MFWGs6uIQGbZX775mpoa8deweSTyQ/QrRLRQ1mP2BPDgBQYg==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@dydxprotocol/v4-client-js@0.36.1:
|
/@dydxprotocol/v4-client-js@0.36.1:
|
||||||
@@ -1010,8 +1006,8 @@ packages:
|
|||||||
- utf-8-validate
|
- utf-8-validate
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@dydxprotocol/v4-localization@0.1.23:
|
/@dydxprotocol/v4-localization@0.1.28:
|
||||||
resolution: {integrity: sha512-TaEey7dINwxELlEyA8XsQ4GQLfJ7e1b434bafpnlG9ccW1sIW7TYTsfaSkck2egR4R736hA7k5WvVy0aI/0TFw==}
|
resolution: {integrity: sha512-g6LwjX7EIRm9HISfSX0H6yhktBCZby5opP/yI2aIUvn2OYyB25WcjLEuEvzW5Bh9XXiLijgLf3Tk91wPKWuFbA==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@dydxprotocol/v4-proto@0.2.1:
|
/@dydxprotocol/v4-proto@0.2.1:
|
||||||
@@ -14099,3 +14095,7 @@ packages:
|
|||||||
/zwitch@2.0.4:
|
/zwitch@2.0.4:
|
||||||
resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==}
|
resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
settings:
|
||||||
|
autoInstallPeers: true
|
||||||
|
excludeLinksFromLockfile: false
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
+707
-117
@@ -1,31 +1,42 @@
|
|||||||
{
|
{
|
||||||
"deployments":{
|
"deployments": {
|
||||||
"MAINNET":null,
|
"MAINNET": {
|
||||||
"TESTNET":{
|
"environments": [
|
||||||
"environments":[
|
"dydxprotocol-mainnet"
|
||||||
|
],
|
||||||
|
"default": "dydxprotocol-mainnet"
|
||||||
|
},
|
||||||
|
"TESTNET": {
|
||||||
|
"environments": [
|
||||||
"dydxprotocol-testnet"
|
"dydxprotocol-testnet"
|
||||||
],
|
],
|
||||||
"default":"dydxprotocol-testnet"
|
"default": "dydxprotocol-testnet"
|
||||||
},
|
},
|
||||||
"DEV":{
|
"DEV": {
|
||||||
"environments":[
|
"environments": [
|
||||||
"dydxprotocol-dev",
|
"dydxprotocol-dev",
|
||||||
"dydxprotocol-dev-2",
|
"dydxprotocol-dev-2",
|
||||||
"dydxprotocol-dev-4",
|
"dydxprotocol-dev-4",
|
||||||
"dydxprotocol-dev-5",
|
"dydxprotocol-dev-5",
|
||||||
"dydxprotocol-staging",
|
"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":{
|
"environments": {
|
||||||
"dydxprotocol-dev":{
|
"dydxprotocol-dev": {
|
||||||
"name":"v4 Dev",
|
"name": "v4 Dev",
|
||||||
"ethereumChainId":"5",
|
"ethereumChainId": "5",
|
||||||
"dydxChainId":"dydxprotocol-testnet",
|
"dydxChainId": "dydxprotocol-testnet",
|
||||||
"isMainNet":false,
|
"isMainNet": false,
|
||||||
"tokens":{
|
"tokens": {
|
||||||
"chain": {
|
"chain": {
|
||||||
"name": "DYDX",
|
"name": "DYDX",
|
||||||
"denom": "dv4tnt",
|
"denom": "dv4tnt",
|
||||||
@@ -34,34 +45,57 @@
|
|||||||
"usdc": {
|
"usdc": {
|
||||||
"name": "USDC",
|
"name": "USDC",
|
||||||
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
||||||
|
"gasDenom": "uusdc",
|
||||||
"image": "/currencies/usdc.png"
|
"image": "/currencies/usdc.png"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"endpoints":{
|
"endpoints": {
|
||||||
"indexers":[
|
"indexers": [
|
||||||
{
|
{
|
||||||
"api":"http://indexer.v4dev.dydx.exchange",
|
"api": "http://indexer.v4dev.dydx.exchange",
|
||||||
"socket":"wss://indexer.v4dev.dydx.exchange"
|
"socket": "wss://indexer.v4dev.dydx.exchange"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"validators":[
|
"validators": [
|
||||||
"http://validator.v4dev.dydx.exchange"
|
"http://validator.v4dev.dydx.exchange"
|
||||||
],
|
],
|
||||||
"0xsquid":"https://testnet.api.0xsquid.com",
|
"0xsquid": "https://testnet.api.0xsquid.com",
|
||||||
"faucet":"http://faucet.v4dev.dydx.exchange"
|
"faucet": "http://faucet.v4dev.dydx.exchange"
|
||||||
},
|
},
|
||||||
"links":{
|
"links": {
|
||||||
"tos":"https://dydx.exchange/v4-terms",
|
"tos": "https://dydx.exchange/v4-terms",
|
||||||
"privacy":"https://dydx.exchange/privacy",
|
"privacy": "https://dydx.exchange/privacy",
|
||||||
"mintscan":"https://testnet.mintscan.io/dydx-testnet/txs/{tx_hash}"
|
"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":{
|
"dydxprotocol-dev-2": {
|
||||||
"name":"v4 Dev 2",
|
"name": "v4 Dev 2",
|
||||||
"ethereumChainId":"5",
|
"ethereumChainId": "5",
|
||||||
"dydxChainId":"dydxprotocol-testnet",
|
"dydxChainId": "dydxprotocol-testnet",
|
||||||
"isMainNet":false,
|
"isMainNet": false,
|
||||||
"tokens":{
|
"tokens": {
|
||||||
"chain": {
|
"chain": {
|
||||||
"name": "DYDX",
|
"name": "DYDX",
|
||||||
"denom": "dv4tnt",
|
"denom": "dv4tnt",
|
||||||
@@ -70,33 +104,56 @@
|
|||||||
"usdc": {
|
"usdc": {
|
||||||
"name": "USDC",
|
"name": "USDC",
|
||||||
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
||||||
|
"gasDenom": "uusdc",
|
||||||
"image": "/currencies/usdc.png"
|
"image": "/currencies/usdc.png"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"endpoints":{
|
"endpoints": {
|
||||||
"indexers":[
|
"indexers": [
|
||||||
{
|
{
|
||||||
"api":"http://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"
|
"socket": "ws://dev2-indexer-apne1-lb-public-2076363889.ap-northeast-1.elb.amazonaws.com"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"validators":[
|
"validators": [
|
||||||
"http://35.75.227.118"
|
"http://35.75.227.118"
|
||||||
],
|
],
|
||||||
"0xsquid":"https://testnet.api.0xsquid.com"
|
"0xsquid": "https://testnet.api.0xsquid.com"
|
||||||
},
|
},
|
||||||
"links":{
|
"links": {
|
||||||
"tos":"https://dydx.exchange/v4-terms",
|
"tos": "https://dydx.exchange/v4-terms",
|
||||||
"privacy":"https://dydx.exchange/privacy",
|
"privacy": "https://dydx.exchange/privacy",
|
||||||
"mintscan":"https://testnet.mintscan.io/dydx-testnet/txs/{tx_hash}"
|
"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":{
|
"dydxprotocol-dev-4": {
|
||||||
"name":"v4 Dev 4",
|
"name": "v4 Dev 4",
|
||||||
"ethereumChainId":"5",
|
"ethereumChainId": "5",
|
||||||
"dydxChainId":"dydxprotocol-testnet",
|
"dydxChainId": "dydxprotocol-testnet",
|
||||||
"isMainNet":false,
|
"isMainNet": false,
|
||||||
"tokens":{
|
"tokens": {
|
||||||
"chain": {
|
"chain": {
|
||||||
"name": "DYDX",
|
"name": "DYDX",
|
||||||
"denom": "dv4tnt",
|
"denom": "dv4tnt",
|
||||||
@@ -105,33 +162,56 @@
|
|||||||
"usdc": {
|
"usdc": {
|
||||||
"name": "USDC",
|
"name": "USDC",
|
||||||
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
||||||
|
"gasDenom": "uusdc",
|
||||||
"image": "/currencies/usdc.png"
|
"image": "/currencies/usdc.png"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"endpoints":{
|
"endpoints": {
|
||||||
"indexers":[
|
"indexers": [
|
||||||
{
|
{
|
||||||
"api":"http://indexer.v4dev4.dydx.exchange",
|
"api": "http://indexer.v4dev4.dydx.exchange",
|
||||||
"socket":"ws://indexer.v4dev4.dydx.exchange"
|
"socket": "ws://indexer.v4dev4.dydx.exchange"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"validators":[
|
"validators": [
|
||||||
"http://validator.v4dev4.dydx.exchange"
|
"http://validator.v4dev4.dydx.exchange"
|
||||||
],
|
],
|
||||||
"0xsquid":"https://testnet.api.0xsquid.com"
|
"0xsquid": "https://testnet.api.0xsquid.com"
|
||||||
},
|
},
|
||||||
"links":{
|
"links": {
|
||||||
"tos":"https://dydx.exchange/v4-terms",
|
"tos": "https://dydx.exchange/v4-terms",
|
||||||
"privacy":"https://dydx.exchange/privacy",
|
"privacy": "https://dydx.exchange/privacy",
|
||||||
"mintscan":"https://testnet.mintscan.io/dydx-testnet/txs/{tx_hash}"
|
"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":{
|
"dydxprotocol-dev-5": {
|
||||||
"name":"v4 Dev 5",
|
"name": "v4 Dev 5",
|
||||||
"ethereumChainId":"5",
|
"ethereumChainId": "5",
|
||||||
"dydxChainId":"dydxprotocol-testnet",
|
"dydxChainId": "dydxprotocol-testnet",
|
||||||
"isMainNet":false,
|
"isMainNet": false,
|
||||||
"tokens":{
|
"tokens": {
|
||||||
"chain": {
|
"chain": {
|
||||||
"name": "DYDX",
|
"name": "DYDX",
|
||||||
"denom": "dv4tnt",
|
"denom": "dv4tnt",
|
||||||
@@ -140,33 +220,56 @@
|
|||||||
"usdc": {
|
"usdc": {
|
||||||
"name": "USDC",
|
"name": "USDC",
|
||||||
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
||||||
|
"gasDenom": "uusdc",
|
||||||
"image": "/currencies/usdc.png"
|
"image": "/currencies/usdc.png"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"endpoints":{
|
"endpoints": {
|
||||||
"indexers":[
|
"indexers": [
|
||||||
{
|
{
|
||||||
"api":"http://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"
|
"socket": "ws://dev5-indexer-apne1-lb-public-1721328151.ap-northeast-1.elb.amazonaws.com"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"validators":[
|
"validators": [
|
||||||
"http://18.223.78.50"
|
"http://18.223.78.50"
|
||||||
],
|
],
|
||||||
"0xsquid":"https://testnet.api.0xsquid.com"
|
"0xsquid": "https://testnet.api.0xsquid.com"
|
||||||
},
|
},
|
||||||
"links":{
|
"links": {
|
||||||
"tos":"https://dydx.exchange/v4-terms",
|
"tos": "https://dydx.exchange/v4-terms",
|
||||||
"privacy":"https://dydx.exchange/privacy",
|
"privacy": "https://dydx.exchange/privacy",
|
||||||
"mintscan":"https://testnet.mintscan.io/dydx-testnet/txs/{tx_hash}"
|
"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":{
|
"dydxprotocol-staging": {
|
||||||
"name":"v4 Staging",
|
"name": "v4 Staging",
|
||||||
"ethereumChainId":"5",
|
"ethereumChainId": "5",
|
||||||
"dydxChainId":"dydxprotocol-testnet",
|
"dydxChainId": "dydxprotocol-testnet",
|
||||||
"isMainNet":false,
|
"isMainNet": false,
|
||||||
"tokens":{
|
"tokens": {
|
||||||
"chain": {
|
"chain": {
|
||||||
"name": "DYDX",
|
"name": "DYDX",
|
||||||
"denom": "dv4tnt",
|
"denom": "dv4tnt",
|
||||||
@@ -175,37 +278,60 @@
|
|||||||
"usdc": {
|
"usdc": {
|
||||||
"name": "USDC",
|
"name": "USDC",
|
||||||
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
||||||
|
"gasDenom": "uusdc",
|
||||||
"image": "/currencies/usdc.png"
|
"image": "/currencies/usdc.png"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"endpoints":{
|
"endpoints": {
|
||||||
"indexers":[
|
"indexers": [
|
||||||
{
|
{
|
||||||
"api":"https://indexer.v4staging.dydx.exchange",
|
"api": "https://indexer.v4staging.dydx.exchange",
|
||||||
"socket":"wss://indexer.v4staging.dydx.exchange"
|
"socket": "wss://indexer.v4staging.dydx.exchange"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"faucet":"https://faucet.v4staging.dydx.exchange",
|
"faucet": "https://faucet.v4staging.dydx.exchange",
|
||||||
"validators":[
|
"validators": [
|
||||||
"https://validator.v4staging.dydx.exchange"
|
"https://validator.v4staging.dydx.exchange"
|
||||||
],
|
],
|
||||||
"0xsquid":"https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app"
|
"0xsquid": "https://testnet.api.squidrouter.com"
|
||||||
},
|
},
|
||||||
"links":{
|
"links": {
|
||||||
"tos":"https://dydx.exchange/v4-terms",
|
"tos": "https://dydx.exchange/v4-terms",
|
||||||
"privacy":"https://dydx.exchange/privacy",
|
"privacy": "https://dydx.exchange/privacy",
|
||||||
"mintscan":"https://testnet.mintscan.io/dydx-testnet/txs/{tx_hash}",
|
"mintscan": "https://testnet.mintscan.io/dydx-testnet/txs/{tx_hash}",
|
||||||
"documentation":"https://v4-teacher.vercel.app/",
|
"documentation": "https://v4-teacher.vercel.app/",
|
||||||
"community":"https://discord.com/invite/dydx",
|
"community": "https://discord.com/invite/dydx",
|
||||||
"feedback":"https://docs.google.com/forms/d/e/1FAIpQLSezLsWCKvAYDEb7L-2O4wOON1T56xxro9A2Azvl6IxXHP_15Q/viewform"
|
"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":{
|
"dydxprotocol-staging-west": {
|
||||||
"name":"v4 Public Testnet",
|
"name": "v4 Staging West",
|
||||||
"ethereumChainId":"5",
|
"ethereumChainId": "5",
|
||||||
"dydxChainId":"dydx-testnet-3",
|
"dydxChainId": "dydxprotocol-testnet",
|
||||||
"isMainNet":false,
|
"isMainNet": false,
|
||||||
"tokens":{
|
"tokens": {
|
||||||
"chain": {
|
"chain": {
|
||||||
"name": "DYDX",
|
"name": "DYDX",
|
||||||
"denom": "dv4tnt",
|
"denom": "dv4tnt",
|
||||||
@@ -214,30 +340,494 @@
|
|||||||
"usdc": {
|
"usdc": {
|
||||||
"name": "USDC",
|
"name": "USDC",
|
||||||
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
||||||
|
"gasDenom": "uusdc",
|
||||||
"image": "/currencies/usdc.png"
|
"image": "/currencies/usdc.png"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"endpoints":{
|
"endpoints": {
|
||||||
"indexers":[
|
"indexers": [
|
||||||
{
|
{
|
||||||
"api":"https://dydx-testnet.imperator.co",
|
"api": "https://indexer.v4staging.dydx.exchange",
|
||||||
"socket":"wss://dydx-testnet.imperator.co"
|
"socket": "wss://indexer.v4staging.dydx.exchange"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"validators":[
|
"faucet": "https://faucet.v4staging.dydx.exchange",
|
||||||
"https://dydx-testnet.nodefleet.org",
|
"validators": [
|
||||||
"https://test-dydx.kingnodes.com/"
|
"https://validator-uswest1.v4staging.dydx.exchange"
|
||||||
],
|
],
|
||||||
"0xsquid":"https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app",
|
"0xsquid": "https://testnet.api.squidrouter.com"
|
||||||
"faucet":"https://faucet.v4testnet.dydx.exchange"
|
|
||||||
},
|
},
|
||||||
"links":{
|
"links": {
|
||||||
"tos":"https://dydx.exchange/v4-terms",
|
"tos": "https://dydx.exchange/v4-terms",
|
||||||
"privacy":"https://dydx.exchange/privacy",
|
"privacy": "https://dydx.exchange/privacy",
|
||||||
"mintscan":"https://testnet.mintscan.io/dydx-testnet/txs/{tx_hash}",
|
"mintscan": "https://testnet.mintscan.io/dydx-testnet/txs/{tx_hash}",
|
||||||
"documentation":"https://v4-teacher.vercel.app/",
|
"documentation": "https://v4-teacher.vercel.app/",
|
||||||
"community":"https://discord.com/invite/dydx",
|
"community": "https://discord.com/invite/dydx",
|
||||||
"feedback":"https://docs.google.com/forms/d/e/1FAIpQLSezLsWCKvAYDEb7L-2O4wOON1T56xxro9A2Azvl6IxXHP_15Q/viewform"
|
"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 path={AppRoute.Trade} element={<TradePage />} />
|
||||||
</Route>
|
</Route>
|
||||||
<Route path={AppRoute.Markets} element={<MarketsPage />} />
|
<Route path={AppRoute.Markets} element={<MarketsPage />} />
|
||||||
{import.meta.env.MODE !== 'production' && (
|
<Route path={AppRoute.Rewards} element={<RewardsPage />} />
|
||||||
<Route path={AppRoute.Rewards} element={<RewardsPage />} />
|
|
||||||
)}
|
|
||||||
{isTablet && (
|
{isTablet && (
|
||||||
<>
|
<>
|
||||||
<Route path={AppRoute.Alerts} element={<AlertsPage />} />
|
<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 CURRENT_ABACUS_DEPLOYMENT = import.meta.env.MODE === 'production' ? 'TESTNET' : 'DEV';
|
||||||
export const ENVIRONMENT_CONFIG_MAP = environments.environments;
|
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;
|
export const DEFAULT_APP_ENVIRONMENT = AVAILABLE_ENVIRONMENTS.default as DydxNetwork;
|
||||||
|
|||||||
+17
-14
@@ -24,6 +24,8 @@ import {
|
|||||||
|
|
||||||
import { isMetaMask } from '@/lib/wallet/providers';
|
import { isMetaMask } from '@/lib/wallet/providers';
|
||||||
|
|
||||||
|
import { DydxNetwork, ENVIRONMENT_CONFIG_MAP } from './networks';
|
||||||
|
|
||||||
// Wallet connection types
|
// Wallet connection types
|
||||||
|
|
||||||
export enum WalletConnectionType {
|
export enum WalletConnectionType {
|
||||||
@@ -266,7 +268,7 @@ export const wallets: Record<WalletType, WalletConfig> = {
|
|||||||
walletconnect2Id: '4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0',
|
walletconnect2Id: '4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0',
|
||||||
},
|
},
|
||||||
[WalletType.WalletConnect2]: {
|
[WalletType.WalletConnect2]: {
|
||||||
type: WalletType.WalletConnect,
|
type: WalletType.WalletConnect2,
|
||||||
stringKey: STRING_KEYS.WALLET_CONNECT_2,
|
stringKey: STRING_KEYS.WALLET_CONNECT_2,
|
||||||
icon: WalletConnectIcon,
|
icon: WalletConnectIcon,
|
||||||
connectionTypes: [WalletConnectionType.WalletConnect2],
|
connectionTypes: [WalletConnectionType.WalletConnect2],
|
||||||
@@ -318,20 +320,21 @@ export type WalletConnection = {
|
|||||||
export const COSMOS_DERIVATION_PATH = "m/44'/118'/0'/0/0";
|
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 = {
|
export const getSignTypedData = (selectedNetwork: DydxNetwork) =>
|
||||||
primaryType: 'dYdX',
|
({
|
||||||
domain: {
|
primaryType: 'dYdX',
|
||||||
name: 'dYdX V4',
|
domain: {
|
||||||
},
|
name: ENVIRONMENT_CONFIG_MAP[selectedNetwork].wallets.signTypedDataDomainName,
|
||||||
types: {
|
},
|
||||||
dYdX: [{ name: 'action', type: 'string' }],
|
types: {
|
||||||
},
|
dYdX: [{ name: 'action', type: 'string' }],
|
||||||
message: {
|
},
|
||||||
action: 'dYdX V4 Onboarding',
|
message: {
|
||||||
},
|
action: ENVIRONMENT_CONFIG_MAP[selectedNetwork].wallets.signTypedDataAction,
|
||||||
} as const;
|
},
|
||||||
|
} as const);
|
||||||
|
|
||||||
export type PrivateInformation = ReturnType<typeof onboarding.deriveHDKeyFromEthereumSignature>;
|
export type PrivateInformation = ReturnType<typeof onboarding.deriveHDKeyFromEthereumSignature>;
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import { useLocalStorage } from '@/hooks';
|
|||||||
import { initializeLocalization } from '@/state/app';
|
import { initializeLocalization } from '@/state/app';
|
||||||
|
|
||||||
import abacusStateManager from '@/lib/abacus';
|
import abacusStateManager from '@/lib/abacus';
|
||||||
|
import { validateAgainstAvailableEnvironments } from '@/lib/network';
|
||||||
|
|
||||||
export const useInitializePage = () => {
|
export const useInitializePage = () => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
@@ -18,6 +19,7 @@ export const useInitializePage = () => {
|
|||||||
const [localStorageNetwork] = useLocalStorage<DydxNetwork>({
|
const [localStorageNetwork] = useLocalStorage<DydxNetwork>({
|
||||||
key: LocalStorageKey.SelectedNetwork,
|
key: LocalStorageKey.SelectedNetwork,
|
||||||
defaultValue: DEFAULT_APP_ENVIRONMENT,
|
defaultValue: DEFAULT_APP_ENVIRONMENT,
|
||||||
|
validateFn: validateAgainstAvailableEnvironments,
|
||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import { useAccounts, useLocalStorage } from '@/hooks';
|
|||||||
import { setSelectedNetwork } from '@/state/app';
|
import { setSelectedNetwork } from '@/state/app';
|
||||||
import { getSelectedNetwork } from '@/state/appSelectors';
|
import { getSelectedNetwork } from '@/state/appSelectors';
|
||||||
|
|
||||||
|
import { validateAgainstAvailableEnvironments } from '@/lib/network';
|
||||||
|
|
||||||
export const useSelectedNetwork = (): {
|
export const useSelectedNetwork = (): {
|
||||||
switchNetwork: (network: DydxNetwork) => void;
|
switchNetwork: (network: DydxNetwork) => void;
|
||||||
selectedNetwork: DydxNetwork;
|
selectedNetwork: DydxNetwork;
|
||||||
@@ -20,6 +22,7 @@ export const useSelectedNetwork = (): {
|
|||||||
const [, setLocalStorageNetwork] = useLocalStorage<DydxNetwork>({
|
const [, setLocalStorageNetwork] = useLocalStorage<DydxNetwork>({
|
||||||
key: LocalStorageKey.SelectedNetwork,
|
key: LocalStorageKey.SelectedNetwork,
|
||||||
defaultValue: DEFAULT_APP_ENVIRONMENT,
|
defaultValue: DEFAULT_APP_ENVIRONMENT,
|
||||||
|
validateFn: validateAgainstAvailableEnvironments,
|
||||||
});
|
});
|
||||||
|
|
||||||
const switchNetwork = useCallback(
|
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', () => {
|
describe('getStringsForTimeInterval', () => {
|
||||||
it.each([
|
it.each([
|
||||||
[Duration.fromObject({ months: 2 }), '2', 'MONTHS_ABBREVIATED'],
|
[Duration.fromObject({ months: 2 }), '2', 'APP.GENERAL.TIME_STRINGS.MONTHS_ABBREVIATED'],
|
||||||
[Duration.fromObject({ weeks: 3, days: 2 }), '3', 'WEEKS_ABBREVIATED'],
|
[Duration.fromObject({ weeks: 3, days: 2 }), '3', 'APP.GENERAL.TIME_STRINGS.WEEKS_ABBREVIATED'],
|
||||||
[Duration.fromObject({ days: 5, hours: 12 }), '6', 'DAYS_ABBREVIATED'],
|
[Duration.fromObject({ days: 5, hours: 12 }), '6', 'APP.GENERAL.TIME_STRINGS.DAYS_ABBREVIATED'],
|
||||||
[Duration.fromObject({ hours: 8, minutes: 30 }), '9', 'HOURS_ABBREVIATED'],
|
[
|
||||||
[Duration.fromObject({ minutes: 45 }), '45', 'MINUTES_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',
|
'returns the correct timeString and unitStringKey',
|
||||||
(timeInterval, expectedTimeString, expectedUnitStringKey) => {
|
(timeInterval, expectedTimeString, expectedUnitStringKey) => {
|
||||||
@@ -35,6 +35,7 @@ import { setAssets } from '@/state/assets';
|
|||||||
import { setConfigs } from '@/state/configs';
|
import { setConfigs } from '@/state/configs';
|
||||||
import { setInputs } from '@/state/inputs';
|
import { setInputs } from '@/state/inputs';
|
||||||
import { setHistoricalFundings, setLiveTrades, setMarkets, setOrderbook } from '@/state/perpetuals';
|
import { setHistoricalFundings, setLiveTrades, setMarkets, setOrderbook } from '@/state/perpetuals';
|
||||||
|
import { isTruthy } from '../isTruthy';
|
||||||
|
|
||||||
class AbacusStateNotifier implements AbacusStateNotificationProtocol {
|
class AbacusStateNotifier implements AbacusStateNotificationProtocol {
|
||||||
private store: RootStore | undefined;
|
private store: RootStore | undefined;
|
||||||
@@ -84,7 +85,7 @@ class AbacusStateNotifier implements AbacusStateNotificationProtocol {
|
|||||||
dispatch(setBalances(balances));
|
dispatch(setBalances(balances));
|
||||||
}
|
}
|
||||||
if (updatedState.account?.stakingBalances) {
|
if (updatedState.account?.stakingBalances) {
|
||||||
const stakingBalances: Record<string, AccountBalance> = {}
|
const stakingBalances: Record<string, AccountBalance> = {};
|
||||||
for (const { k, v } of updatedState.account.stakingBalances.toArray()) {
|
for (const { k, v } of updatedState.account.stakingBalances.toArray()) {
|
||||||
stakingBalances[k] = v;
|
stakingBalances[k] = v;
|
||||||
}
|
}
|
||||||
@@ -108,10 +109,12 @@ class AbacusStateNotifier implements AbacusStateNotificationProtocol {
|
|||||||
dispatch(
|
dispatch(
|
||||||
setMarkets({
|
setMarkets({
|
||||||
markets: Object.fromEntries(
|
markets: Object.fromEntries(
|
||||||
(marketIds || updatedState.marketIds()?.toArray() || []).map((marketId: string) => {
|
(marketIds || updatedState.marketIds()?.toArray() || [])
|
||||||
const marketData = updatedState.market(marketId);
|
.map((marketId: string) => {
|
||||||
return [marketId, marketData];
|
const marketData = updatedState.market(marketId);
|
||||||
})
|
return [marketId, marketData];
|
||||||
|
})
|
||||||
|
.filter(isTruthy)
|
||||||
) as Record<string, PerpetualMarket>,
|
) as Record<string, PerpetualMarket>,
|
||||||
update: !!marketIds,
|
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
|
? value
|
||||||
: typeof value === 'string'
|
: typeof value === 'string'
|
||||||
? new Date(value).getTime()
|
? new Date(value).getTime()
|
||||||
: new Date(value.toString()).getTime()
|
: new Date(value.toNumber()).getTime()
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
export const getStringsForDateTimeDiff = (dateTime: DateTime) => {
|
export const getStringsForDateTimeDiff = (dateTime: DateTime) => {
|
||||||
@@ -77,4 +77,4 @@ export const formatSeconds = (seconds: number) => {
|
|||||||
const minutes = Math.floor(seconds / 60);
|
const minutes = Math.floor(seconds / 60);
|
||||||
const remainingSeconds = seconds % 60;
|
const remainingSeconds = seconds % 60;
|
||||||
return `${getTimeString(minutes)}:${getTimeString(remainingSeconds)}`;
|
return `${getTimeString(minutes)}:${getTimeString(remainingSeconds)}`;
|
||||||
}
|
};
|
||||||
|
|||||||
+2
-3
@@ -100,11 +100,10 @@ const walletconnect2ConnectorOptions: ConstructorParameters<typeof WalletConnect
|
|||||||
options: {
|
options: {
|
||||||
projectId: import.meta.env.VITE_WALLETCONNECT2_PROJECT_ID,
|
projectId: import.meta.env.VITE_WALLETCONNECT2_PROJECT_ID,
|
||||||
metadata: {
|
metadata: {
|
||||||
// TODO: update to local URLs/images
|
|
||||||
name: 'dYdX',
|
name: 'dYdX',
|
||||||
description: '',
|
description: '',
|
||||||
url: 'https://trade.dydx.exchange',
|
url: import.meta.env.VITE_BASE_URL,
|
||||||
icons: ['https://trade.dydx.exchange/cbw-image.png'],
|
icons: [`${import.meta.env.VITE_BASE_URL}/cbw-image.png}`],
|
||||||
},
|
},
|
||||||
showQrModal: true,
|
showQrModal: true,
|
||||||
qrModalOptions: {
|
qrModalOptions: {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { LocalStorageKey } from '@/constants/localStorage';
|
|||||||
import { DEFAULT_APP_ENVIRONMENT, type DydxNetwork } from '@/constants/networks';
|
import { DEFAULT_APP_ENVIRONMENT, type DydxNetwork } from '@/constants/networks';
|
||||||
|
|
||||||
import { getLocalStorage } from '@/lib/localStorage';
|
import { getLocalStorage } from '@/lib/localStorage';
|
||||||
|
import { validateAgainstAvailableEnvironments } from '@/lib/network';
|
||||||
|
|
||||||
export interface AppState {
|
export interface AppState {
|
||||||
apiState: AbacusApiState | undefined;
|
apiState: AbacusApiState | undefined;
|
||||||
@@ -19,6 +20,7 @@ const initialState: AppState = {
|
|||||||
selectedNetwork: getLocalStorage({
|
selectedNetwork: getLocalStorage({
|
||||||
key: LocalStorageKey.SelectedNetwork,
|
key: LocalStorageKey.SelectedNetwork,
|
||||||
defaultValue: DEFAULT_APP_ENVIRONMENT,
|
defaultValue: DEFAULT_APP_ENVIRONMENT,
|
||||||
|
validateFn: validateAgainstAvailableEnvironments,
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -139,11 +139,9 @@ export const MarketDetails: React.FC = () => {
|
|||||||
</Styled.WrapRow>
|
</Styled.WrapRow>
|
||||||
|
|
||||||
<Styled.MarketDescription>
|
<Styled.MarketDescription>
|
||||||
{primaryDescriptionKey && (
|
{primaryDescriptionKey && <p>{stringGetter({ key: `APP.${primaryDescriptionKey}` })}</p>}
|
||||||
<p>{stringGetter({ key: STRING_KEYS[primaryDescriptionKey as StringKey] })}</p>
|
|
||||||
)}
|
|
||||||
{secondaryDescriptionKey && (
|
{secondaryDescriptionKey && (
|
||||||
<p>{stringGetter({ key: STRING_KEYS[secondaryDescriptionKey as StringKey] })}</p>
|
<p>{stringGetter({ key: `APP.${secondaryDescriptionKey}` })}</p>
|
||||||
)}
|
)}
|
||||||
</Styled.MarketDescription>
|
</Styled.MarketDescription>
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,15 @@ export const TransferStatusToast = ({
|
|||||||
|
|
||||||
if (!status) return <LoadingDots size={3} />;
|
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 (
|
return (
|
||||||
<Styled.Root open={open} onOpenChange={setOpen}>
|
<Styled.Root open={open} onOpenChange={setOpen}>
|
||||||
<WithReceipt
|
<WithReceipt
|
||||||
@@ -67,7 +76,7 @@ export const TransferStatusToast = ({
|
|||||||
<Styled.BridgingStatus>
|
<Styled.BridgingStatus>
|
||||||
<Styled.Status>
|
<Styled.Status>
|
||||||
{stringGetter({
|
{stringGetter({
|
||||||
key: type === 'deposit' ? STRING_KEYS.DEPOSIT_STATUS : STRING_KEYS.WITHDRAW_STATUS,
|
key: statusString,
|
||||||
params: {
|
params: {
|
||||||
AMOUNT_USD: <Styled.InlineOutput type={OutputType.Fiat} value={toAmount} />,
|
AMOUNT_USD: <Styled.InlineOutput type={OutputType.Fiat} value={toAmount} />,
|
||||||
ESTIMATED_DURATION: (
|
ESTIMATED_DURATION: (
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export const TransferStatusSteps = ({ status }: ElementProps) => {
|
|||||||
label: stringGetter({
|
label: stringGetter({
|
||||||
key: type === 'deposit' ? STRING_KEYS.DEPOSIT_TO_CHAIN : STRING_KEYS.WITHDRAW_TO_CHAIN,
|
key: type === 'deposit' ? STRING_KEYS.DEPOSIT_TO_CHAIN : STRING_KEYS.WITHDRAW_TO_CHAIN,
|
||||||
params: {
|
params: {
|
||||||
CHAIN: status?.toChain?.chainData?.chainName,
|
CHAIN: type === 'deposit' ? 'dYdX' : status?.toChain?.chainData?.chainName,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
step: TransferStatusStep.ToChain,
|
step: TransferStatusStep.ToChain,
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ export const DisconnectDialog = ({ setIsOpen }: ElementProps) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog isOpen setIsOpen={setIsOpen} title="Disconnect">
|
<Dialog isOpen setIsOpen={setIsOpen} title={stringGetter({ key: STRING_KEYS.DISCONNECT })}>
|
||||||
<Styled.Content>
|
<Styled.Content>
|
||||||
<p>Are you sure you want to disconnect your account?</p>
|
<p>{stringGetter({ key: STRING_KEYS.DISCONNECT_CONFIRMATION })}</p>
|
||||||
<Styled.ButtonRow>
|
<Styled.ButtonRow>
|
||||||
<Close asChild>
|
<Close asChild>
|
||||||
<Button action={ButtonAction.Destroy} onClick={disconnect}>
|
<Button action={ButtonAction.Destroy} onClick={disconnect}>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import { useDisplayedWallets } from '@/hooks/useDisplayedWallets';
|
|||||||
import { breakpoints } from '@/styles';
|
import { breakpoints } from '@/styles';
|
||||||
import { layoutMixins } from '@/styles/layoutMixins';
|
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 = () => {
|
export const ChooseWallet = () => {
|
||||||
const stringGetter = useStringGetter();
|
const stringGetter = useStringGetter();
|
||||||
@@ -34,7 +34,14 @@ export const ChooseWallet = () => {
|
|||||||
<Styled.AlertMessage type={AlertType.Error}>
|
<Styled.AlertMessage type={AlertType.Error}>
|
||||||
{
|
{
|
||||||
<h4>
|
<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>
|
</h4>
|
||||||
}
|
}
|
||||||
{selectedWalletError}
|
{selectedWalletError}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { AnalyticsEvent } from '@/constants/analytics';
|
|||||||
import { ButtonAction } from '@/constants/buttons';
|
import { ButtonAction } from '@/constants/buttons';
|
||||||
import { STRING_KEYS } from '@/constants/localization';
|
import { STRING_KEYS } from '@/constants/localization';
|
||||||
import { ENVIRONMENT_CONFIG_MAP } from '@/constants/networks';
|
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 { useAccounts, useBreakpoints, useDydxClient, useStringGetter } from '@/hooks';
|
||||||
import { useMatchingEvmNetwork } from '@/hooks/useMatchingEvmNetwork';
|
import { useMatchingEvmNetwork } from '@/hooks/useMatchingEvmNetwork';
|
||||||
@@ -85,10 +85,11 @@ export const GenerateKeys = ({
|
|||||||
EvmDerivedAccountStatus.Derived,
|
EvmDerivedAccountStatus.Derived,
|
||||||
].includes(status);
|
].includes(status);
|
||||||
|
|
||||||
|
const signTypedData = getSignTypedData(selectedNetwork);
|
||||||
const { signTypedDataAsync } = useSignTypedData({
|
const { signTypedDataAsync } = useSignTypedData({
|
||||||
...SIGN_TYPED_DATA,
|
...signTypedData,
|
||||||
domain: {
|
domain: {
|
||||||
...SIGN_TYPED_DATA.domain,
|
...signTypedData.domain,
|
||||||
chainId,
|
chainId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -165,8 +166,8 @@ export const GenerateKeys = ({
|
|||||||
{[
|
{[
|
||||||
{
|
{
|
||||||
status: EvmDerivedAccountStatus.Deriving,
|
status: EvmDerivedAccountStatus.Deriving,
|
||||||
title: stringGetter({ key: STRING_KEYS.GENERATE_COSMOS_WALLET }),
|
title: stringGetter({ key: STRING_KEYS.GENERATE_DYDX_WALLET }),
|
||||||
description: stringGetter({ key: STRING_KEYS.GENERATE_COSMOS_WALLET }),
|
description: stringGetter({ key: STRING_KEYS.VERIFY_WALLET_OWNERSHIP }),
|
||||||
},
|
},
|
||||||
status === EvmDerivedAccountStatus.EnsuringDeterminism && {
|
status === EvmDerivedAccountStatus.EnsuringDeterminism && {
|
||||||
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;
|
const isFormValid = !isDisabled && !isEditingSlippage;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import styled, { type AnyStyledComponent } from 'styled-components';
|
|||||||
import type { NumberFormatValues } from 'react-number-format';
|
import type { NumberFormatValues } from 'react-number-format';
|
||||||
import { shallowEqual, useSelector } from 'react-redux';
|
import { shallowEqual, useSelector } from 'react-redux';
|
||||||
import { TESTNET_CHAIN_ID } from '@dydxprotocol/v4-client-js';
|
import { TESTNET_CHAIN_ID } from '@dydxprotocol/v4-client-js';
|
||||||
|
import { isAddress } from 'viem';
|
||||||
|
|
||||||
import { TransferInputField, TransferInputTokenResource, TransferType } from '@/constants/abacus';
|
import { TransferInputField, TransferInputTokenResource, TransferType } from '@/constants/abacus';
|
||||||
import { AlertType } from '@/constants/alerts';
|
import { AlertType } from '@/constants/alerts';
|
||||||
@@ -26,6 +27,7 @@ import { Link } from '@/components/Link';
|
|||||||
import { OutputType } from '@/components/Output';
|
import { OutputType } from '@/components/Output';
|
||||||
import { Tag } from '@/components/Tag';
|
import { Tag } from '@/components/Tag';
|
||||||
import { WithDetailsReceipt } from '@/components/WithDetailsReceipt';
|
import { WithDetailsReceipt } from '@/components/WithDetailsReceipt';
|
||||||
|
import { Icon, IconName } from '@/components/Icon';
|
||||||
|
|
||||||
import { ChainSelectMenu } from '@/views/forms/AccountManagementForms/ChainSelectMenu';
|
import { ChainSelectMenu } from '@/views/forms/AccountManagementForms/ChainSelectMenu';
|
||||||
|
|
||||||
@@ -59,6 +61,8 @@ export const WithdrawForm = () => {
|
|||||||
resources,
|
resources,
|
||||||
} = useSelector(getTransferInputs, shallowEqual) || {};
|
} = useSelector(getTransferInputs, shallowEqual) || {};
|
||||||
|
|
||||||
|
const isValidAddress = toAddress && isAddress(toAddress);
|
||||||
|
|
||||||
const toToken = useMemo(
|
const toToken = useMemo(
|
||||||
() => (token ? resources?.tokenResources?.get(token) : undefined),
|
() => (token ? resources?.tokenResources?.get(token) : undefined),
|
||||||
[token, resources]
|
[token, resources]
|
||||||
@@ -179,7 +183,6 @@ export const WithdrawForm = () => {
|
|||||||
|
|
||||||
const onSelectChain = useCallback((chain: string) => {
|
const onSelectChain = useCallback((chain: string) => {
|
||||||
if (chain) {
|
if (chain) {
|
||||||
abacusStateManager.clearTransferInputValues();
|
|
||||||
abacusStateManager.setTransferValue({
|
abacusStateManager.setTransferValue({
|
||||||
field: TransferInputField.chain,
|
field: TransferInputField.chain,
|
||||||
value: chain,
|
value: chain,
|
||||||
@@ -190,7 +193,6 @@ export const WithdrawForm = () => {
|
|||||||
|
|
||||||
const onSelectToken = useCallback((token: TransferInputTokenResource) => {
|
const onSelectToken = useCallback((token: TransferInputTokenResource) => {
|
||||||
if (token) {
|
if (token) {
|
||||||
abacusStateManager.clearTransferInputValues();
|
|
||||||
abacusStateManager.setTransferValue({
|
abacusStateManager.setTransferValue({
|
||||||
field: TransferInputField.token,
|
field: TransferInputField.token,
|
||||||
value: token.address,
|
value: token.address,
|
||||||
@@ -265,7 +267,12 @@ export const WithdrawForm = () => {
|
|||||||
placeholder={stringGetter({ key: STRING_KEYS.ADDRESS })}
|
placeholder={stringGetter({ key: STRING_KEYS.ADDRESS })}
|
||||||
onChange={onChangeAddress}
|
onChange={onChangeAddress}
|
||||||
value={toAddress || ''}
|
value={toAddress || ''}
|
||||||
label={stringGetter({ key: STRING_KEYS.DESTINATION })}
|
label={
|
||||||
|
<span>
|
||||||
|
{stringGetter({ key: STRING_KEYS.DESTINATION })}{' '}
|
||||||
|
{isValidAddress ? <Styled.CheckIcon iconName={IconName.Check} /> : null}
|
||||||
|
</span>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<ChainSelectMenu
|
<ChainSelectMenu
|
||||||
label={stringGetter({ key: STRING_KEYS.NETWORK })}
|
label={stringGetter({ key: STRING_KEYS.NETWORK })}
|
||||||
@@ -342,3 +349,10 @@ Styled.TransactionInfo = styled.span`
|
|||||||
Styled.FormInputButton = styled(Button)`
|
Styled.FormInputButton = styled(Button)`
|
||||||
${formMixins.inputInnerButton}
|
${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 { useState } from 'react';
|
||||||
import { shallowEqual, useSelector } from 'react-redux';
|
import { shallowEqual, useSelector } from 'react-redux';
|
||||||
import styled, { type AnyStyledComponent } from 'styled-components';
|
import styled, { type AnyStyledComponent } from 'styled-components';
|
||||||
|
import { formatUnits } from 'viem';
|
||||||
|
|
||||||
import { TransferInputTokenResource } from '@/constants/abacus';
|
import { TransferInputTokenResource } from '@/constants/abacus';
|
||||||
import { ButtonAction, ButtonShape, ButtonSize, ButtonType } from '@/constants/buttons';
|
import { ButtonAction, ButtonShape, ButtonSize, ButtonType } from '@/constants/buttons';
|
||||||
import { STRING_KEYS } from '@/constants/localization';
|
import { STRING_KEYS } from '@/constants/localization';
|
||||||
import { NumberSign } from '@/constants/numbers';
|
import { NumberSign } from '@/constants/numbers';
|
||||||
|
|
||||||
|
import { formatSeconds } from '@/lib/timeUtils';
|
||||||
|
|
||||||
|
import { layoutMixins } from '@/styles/layoutMixins';
|
||||||
|
|
||||||
import { useStringGetter } from '@/hooks';
|
import { useStringGetter } from '@/hooks';
|
||||||
import { useAccountBalance } from '@/hooks/useAccountBalance';
|
import { useAccountBalance } from '@/hooks/useAccountBalance';
|
||||||
import { layoutMixins } from '@/styles/layoutMixins';
|
|
||||||
|
|
||||||
import { Button } from '@/components/Button';
|
import { Button } from '@/components/Button';
|
||||||
|
|
||||||
@@ -16,6 +21,7 @@ import { Details, DetailsItem } from '@/components/Details';
|
|||||||
import { DiffOutput } from '@/components/DiffOutput';
|
import { DiffOutput } from '@/components/DiffOutput';
|
||||||
import { Icon, IconName } from '@/components/Icon';
|
import { Icon, IconName } from '@/components/Icon';
|
||||||
import { Output, OutputType } from '@/components/Output';
|
import { Output, OutputType } from '@/components/Output';
|
||||||
|
import { Tag } from '@/components/Tag';
|
||||||
import { ToggleButton } from '@/components/ToggleButton';
|
import { ToggleButton } from '@/components/ToggleButton';
|
||||||
import { WithReceipt } from '@/components/WithReceipt';
|
import { WithReceipt } from '@/components/WithReceipt';
|
||||||
|
|
||||||
@@ -49,22 +55,14 @@ export const WithdrawButtonAndReceipt = ({
|
|||||||
const [isEditingSlippage, setIsEditingSlipapge] = useState(false);
|
const [isEditingSlippage, setIsEditingSlipapge] = useState(false);
|
||||||
const stringGetter = useStringGetter();
|
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 { leverage } = useSelector(getSubaccount, shallowEqual) || {};
|
||||||
const { summary, requestPayload } = useSelector(getTransferInputs, shallowEqual) || {};
|
const { summary, requestPayload } = useSelector(getTransferInputs, shallowEqual) || {};
|
||||||
|
|
||||||
|
const toAmount =
|
||||||
|
summary?.toAmount &&
|
||||||
|
withdrawToken?.decimals &&
|
||||||
|
formatUnits(BigInt(summary.toAmount), withdrawToken?.decimals);
|
||||||
|
|
||||||
const feeSubitems: DetailsItem[] = [];
|
const feeSubitems: DetailsItem[] = [];
|
||||||
|
|
||||||
if (typeof summary?.gasFee === 'number') {
|
if (typeof summary?.gasFee === 'number') {
|
||||||
@@ -98,9 +96,27 @@ export const WithdrawButtonAndReceipt = ({
|
|||||||
),
|
),
|
||||||
subitems: feeSubitems,
|
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',
|
key: 'leverage',
|
||||||
label: <span>{stringGetter({ key: STRING_KEYS.LEVERAGE })}</span>,
|
label: <span>{stringGetter({ key: STRING_KEYS.ACCOUNT_LEVERAGE })}</span>,
|
||||||
value: (
|
value: (
|
||||||
<Styled.DiffOutput
|
<Styled.DiffOutput
|
||||||
type={OutputType.Multiple}
|
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: 'estimatedRouteDuration',
|
||||||
// key: 'wallet',
|
label: <span>{stringGetter({ key: STRING_KEYS.ESTIMATED_TIME })}</span>,
|
||||||
// label: (
|
value: typeof summary?.estimatedRouteDuration === 'number' && (
|
||||||
// <span>
|
<Output
|
||||||
// {stringGetter({ key: STRING_KEYS.WALLET })}{' '}
|
type={OutputType.Text}
|
||||||
// {withdrawToken && <Tag>{withdrawToken?.symbol}</Tag>}
|
value={stringGetter({
|
||||||
// </span>
|
key: STRING_KEYS.X_MINUTES_LOWERCASED,
|
||||||
// ),
|
params: { X: Math.round(summary?.estimatedRouteDuration / 60) },
|
||||||
// value: (
|
})}
|
||||||
// <Styled.DiffOutput
|
/>
|
||||||
// type={OutputType.Asset}
|
),
|
||||||
// value={balanceBN?.toString()}
|
},
|
||||||
// newValue={newBalance}
|
|
||||||
// sign={NumberSign.Negative}
|
|
||||||
// withDiff={Boolean(balance !== newBalance)}
|
|
||||||
// />
|
|
||||||
// ),
|
|
||||||
// },
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const isFormValid = !isDisabled && !isEditingSlippage;
|
const isFormValid = !isDisabled && !isEditingSlippage;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { layoutMixins } from '@/styles/layoutMixins';
|
|||||||
import { formMixins } from '@/styles/formMixins';
|
import { formMixins } from '@/styles/formMixins';
|
||||||
|
|
||||||
import { TradeInputField } from '@/constants/abacus';
|
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 { INTEGER_DECIMALS } from '@/constants/numbers';
|
||||||
import { TimeUnitShort } from '@/constants/time';
|
import { TimeUnitShort } from '@/constants/time';
|
||||||
import { GOOD_TIL_TIME_TIMESCALE_STRINGS } from '@/constants/trade';
|
import { GOOD_TIL_TIME_TIMESCALE_STRINGS } from '@/constants/trade';
|
||||||
@@ -29,12 +29,12 @@ export const AdvancedTradeOptions = () => {
|
|||||||
const currentTradeFormConfig = useSelector(getInputTradeOptions, shallowEqual);
|
const currentTradeFormConfig = useSelector(getInputTradeOptions, shallowEqual);
|
||||||
const inputTradeData = useSelector(getInputTradeData, 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 } =
|
const { executionOptions, needsGoodUntil, needsPostOnly, needsReduceOnly, timeInForceOptions } =
|
||||||
currentTradeFormConfig || {};
|
currentTradeFormConfig || {};
|
||||||
|
|
||||||
const { duration, unit } = goodUntil || {};
|
const { duration, unit } = goodTil || {};
|
||||||
|
|
||||||
const needsExecution = executionOptions || needsPostOnly || needsReduceOnly;
|
const needsExecution = executionOptions || needsPostOnly || needsReduceOnly;
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ export const AdvancedTradeOptions = () => {
|
|||||||
<Styled.SelectItem
|
<Styled.SelectItem
|
||||||
key={type}
|
key={type}
|
||||||
value={type}
|
value={type}
|
||||||
label={stringGetter({ key: stringKey })}
|
label={stringGetter({ key: stringKey as StringKey })}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</Styled.SelectMenu>
|
</Styled.SelectMenu>
|
||||||
@@ -76,7 +76,7 @@ export const AdvancedTradeOptions = () => {
|
|||||||
onChange={({ value }: NumberFormatValues) => {
|
onChange={({ value }: NumberFormatValues) => {
|
||||||
abacusStateManager.setTradeValue({
|
abacusStateManager.setTradeValue({
|
||||||
value: Number(value),
|
value: Number(value),
|
||||||
field: TradeInputField.goodUntilDuration,
|
field: TradeInputField.goodTilDuration,
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
value={duration ?? ''}
|
value={duration ?? ''}
|
||||||
@@ -86,7 +86,7 @@ export const AdvancedTradeOptions = () => {
|
|||||||
onValueChange={(goodTilTimeTimescale: string) => {
|
onValueChange={(goodTilTimeTimescale: string) => {
|
||||||
abacusStateManager.setTradeValue({
|
abacusStateManager.setTradeValue({
|
||||||
value: goodTilTimeTimescale,
|
value: goodTilTimeTimescale,
|
||||||
field: TradeInputField.goodUntilUnit,
|
field: TradeInputField.goodTilUnit,
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -121,7 +121,7 @@ export const AdvancedTradeOptions = () => {
|
|||||||
<Styled.SelectItem
|
<Styled.SelectItem
|
||||||
key={type}
|
key={type}
|
||||||
value={type}
|
value={type}
|
||||||
label={stringGetter({ key: stringKey })}
|
label={stringGetter({ key: stringKey as StringKey })}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</Styled.SelectMenu>
|
</Styled.SelectMenu>
|
||||||
|
|||||||
Reference in New Issue
Block a user