Compare commits

..
Author SHA1 Message Date
Bill He b35f89c72d add TODO 2023-10-04 12:59:12 -04:00
Bill He a46512f29b address comments 2023-10-04 12:47:02 -04:00
Bill He 8f09f66bb0 rename 2023-10-04 12:32:34 -04:00
Bill He 371397b72e Comment out migration work 2023-10-04 12:32:34 -04:00
Bill He 895fbeb573 address comments 2023-10-04 12:32:34 -04:00
Bill He 662898ce82 add to nav 2023-10-04 12:32:33 -04:00
Bill He abd97a91f9 bump localization 2023-10-04 12:32:33 -04:00
Bill He ba78afc166 Finish up rewards page 2023-10-04 12:32:33 -04:00
Bill He 5ed9af9afa add keplr dialog 2023-10-04 12:32:33 -04:00
Bill He cd7e6298d8 more rewards page panels 2023-10-04 12:32:31 -04:00
Bill He f1a16f9de8 Implement Rewards Page 2023-10-04 12:31:55 -04:00
31 changed files with 350 additions and 1409 deletions
+6
View File
@@ -0,0 +1,6 @@
VITE_BASE_URL=https://v4.testnet.dydx.exchange
VITE_ALCHEMY_API_KEY=FP275q327Yh7qswtZWenbPXdZZdnAFmC
VITE_WALLETCONNECT1_BRIDGE=wss://api.dydx.exchange/wc/
VITE_WALLETCONNECT2_PROJECT_ID=fbe94eaa691fa8d929561f8567062b32
+1
View File
@@ -4,6 +4,7 @@ VITE_ALCHEMY_API_KEY=
VITE_PK_ENCRYPTION_KEY=
VITE_WALLETCONNECT1_BRIDGE=
VITE_WALLETCONNECT2_PROJECT_ID=
VITE_V3_TOKEN_ADDRESS=
-2
View File
@@ -33,13 +33,11 @@ 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
-1
View File
@@ -13,7 +13,6 @@ dist
dist-ssr
*.local
*.key
.env
# Editor directories and files
.vscode/*
+2 -3
View File
@@ -10,7 +10,6 @@
"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",
@@ -38,9 +37,9 @@
"@cosmjs/proto-signing": "^0.31.0",
"@cosmjs/stargate": "^0.31.0",
"@cosmjs/tendermint-rpc": "^0.31.0",
"@dydxprotocol/v4-abacus": "^0.6.4",
"@dydxprotocol/v4-abacus": "^0.6.3",
"@dydxprotocol/v4-client-js": "^0.36.1",
"@dydxprotocol/v4-localization": "^0.1.28",
"@dydxprotocol/v4-localization": "^0.1.23",
"@ethersproject/providers": "^5.7.2",
"@js-joda/core": "^5.5.3",
"@radix-ui/react-collapsible": "^1.0.3",
+12 -12
View File
@@ -1,5 +1,9 @@
lockfileVersion: '6.0'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
dependencies:
'@0xsquid/sdk':
specifier: ^1.10.0
@@ -23,14 +27,14 @@ dependencies:
specifier: ^0.31.0
version: 0.31.0
'@dydxprotocol/v4-abacus':
specifier: ^0.6.4
version: 0.6.4
specifier: ^0.6.3
version: 0.6.3
'@dydxprotocol/v4-client-js':
specifier: ^0.36.1
version: 0.36.1
'@dydxprotocol/v4-localization':
specifier: ^0.1.28
version: 0.1.28
specifier: ^0.1.23
version: 0.1.23
'@ethersproject/providers':
specifier: ^5.7.2
version: 5.7.2
@@ -975,8 +979,8 @@ packages:
resolution: {integrity: sha512-RpfLEtTlyIxeNPGKcokS+p3BZII/Q3bYxryFRglh5H3A3T8q9fsLYm72VYAMEOOIBLEa8o93kFLiBDUWKrwXZA==}
dev: true
/@dydxprotocol/v4-abacus@0.6.4:
resolution: {integrity: sha512-eH+/9Q/OnQtwzBwM1BJyXybFPdivGmFQWrxM71MFWGs6uIQGbZX775mpoa8deweSTyQ/QrRLRQ1mP2BPDgBQYg==}
/@dydxprotocol/v4-abacus@0.6.3:
resolution: {integrity: sha512-oYMbII7o7fXjNpl2PZpG6mwKQ49e8Qky5vA8Ua9boNs7nRUx3PC6azfoPtjHKMdYY33eHoXcZBpTynhneLXCVg==}
dev: false
/@dydxprotocol/v4-client-js@0.36.1:
@@ -1006,8 +1010,8 @@ packages:
- utf-8-validate
dev: false
/@dydxprotocol/v4-localization@0.1.28:
resolution: {integrity: sha512-g6LwjX7EIRm9HISfSX0H6yhktBCZby5opP/yI2aIUvn2OYyB25WcjLEuEvzW5Bh9XXiLijgLf3Tk91wPKWuFbA==}
/@dydxprotocol/v4-localization@0.1.23:
resolution: {integrity: sha512-TaEey7dINwxELlEyA8XsQ4GQLfJ7e1b434bafpnlG9ccW1sIW7TYTsfaSkck2egR4R736hA7k5WvVy0aI/0TFw==}
dev: false
/@dydxprotocol/v4-proto@0.2.1:
@@ -14095,7 +14099,3 @@ packages:
/zwitch@2.0.4:
resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==}
dev: true
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 193 KiB

+116 -732
View File
@@ -1,44 +1,31 @@
{
"deployments": {
"MAINNET": {
"environments": [
"dydxprotocol-mainnet"
],
"default": "dydxprotocol-mainnet"
},
"TESTNET": {
"environments": [
"deployments":{
"MAINNET":null,
"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-staging-west",
"dydxprotocol-testnet",
"dydxprotocol-testnet-dydx",
"dydxprotocol-testnet-dsrv",
"dydxprotocol-testnet-nodefleet",
"dydxprotocol-testnet-kingnodes",
"dydxprotocol-testnet-liquify"
"dydxprotocol-testnet"
],
"default": "dydxprotocol-testnet"
"default":"dydxprotocol-testnet"
}
},
"environments": {
"dydxprotocol-dev": {
"name": "v4 Dev",
"ethereumChainId": "5",
"dydxChainId": "dydxprotocol-testnet",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"isMainNet": false,
"tokens": {
"environments":{
"dydxprotocol-dev":{
"name":"v4 Dev",
"ethereumChainId":"5",
"dydxChainId":"dydxprotocol-testnet",
"isMainNet":false,
"tokens":{
"chain": {
"name": "DYDX",
"denom": "dv4tnt",
@@ -47,59 +34,34 @@
"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}",
"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"
"links":{
"tos":"https://dydx.exchange/v4-terms",
"privacy":"https://dydx.exchange/privacy",
"mintscan":"https://testnet.mintscan.io/dydx-testnet/txs/{tx_hash}"
}
},
"dydxprotocol-dev-2": {
"name": "v4 Dev 2",
"ethereumChainId": "5",
"dydxChainId": "dydxprotocol-testnet",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"isMainNet": false,
"tokens": {
"dydxprotocol-dev-2":{
"name":"v4 Dev 2",
"ethereumChainId":"5",
"dydxChainId":"dydxprotocol-testnet",
"isMainNet":false,
"tokens":{
"chain": {
"name": "DYDX",
"denom": "dv4tnt",
@@ -108,58 +70,33 @@
"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}",
"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"
"links":{
"tos":"https://dydx.exchange/v4-terms",
"privacy":"https://dydx.exchange/privacy",
"mintscan":"https://testnet.mintscan.io/dydx-testnet/txs/{tx_hash}"
}
},
"dydxprotocol-dev-4": {
"name": "v4 Dev 4",
"ethereumChainId": "5",
"dydxChainId": "dydxprotocol-testnet",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"isMainNet": false,
"tokens": {
"dydxprotocol-dev-4":{
"name":"v4 Dev 4",
"ethereumChainId":"5",
"dydxChainId":"dydxprotocol-testnet",
"isMainNet":false,
"tokens":{
"chain": {
"name": "DYDX",
"denom": "dv4tnt",
@@ -168,58 +105,33 @@
"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}",
"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"
"links":{
"tos":"https://dydx.exchange/v4-terms",
"privacy":"https://dydx.exchange/privacy",
"mintscan":"https://testnet.mintscan.io/dydx-testnet/txs/{tx_hash}"
}
},
"dydxprotocol-dev-5": {
"name": "v4 Dev 5",
"ethereumChainId": "5",
"dydxChainId": "dydxprotocol-testnet",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"isMainNet": false,
"tokens": {
"dydxprotocol-dev-5":{
"name":"v4 Dev 5",
"ethereumChainId":"5",
"dydxChainId":"dydxprotocol-testnet",
"isMainNet":false,
"tokens":{
"chain": {
"name": "DYDX",
"denom": "dv4tnt",
@@ -228,58 +140,33 @@
"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}",
"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"
"links":{
"tos":"https://dydx.exchange/v4-terms",
"privacy":"https://dydx.exchange/privacy",
"mintscan":"https://testnet.mintscan.io/dydx-testnet/txs/{tx_hash}"
}
},
"dydxprotocol-staging": {
"name": "v4 Staging",
"ethereumChainId": "5",
"dydxChainId": "dydxprotocol-testnet",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"isMainNet": false,
"tokens": {
"dydxprotocol-staging":{
"name":"v4 Staging",
"ethereumChainId":"5",
"dydxChainId":"dydxprotocol-testnet",
"isMainNet":false,
"tokens":{
"chain": {
"name": "DYDX",
"denom": "dv4tnt",
@@ -288,62 +175,37 @@
"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://testnet.api.squidrouter.com"
"0xsquid":"https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app"
},
"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"
"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"
}
},
"dydxprotocol-staging-west": {
"name": "v4 Staging West",
"ethereumChainId": "5",
"dydxChainId": "dydxprotocol-testnet",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"isMainNet": false,
"tokens": {
"dydxprotocol-testnet":{
"name":"v4 Public Testnet",
"ethereumChainId":"5",
"dydxChainId":"dydx-testnet-3",
"isMainNet":false,
"tokens":{
"chain": {
"name": "DYDX",
"denom": "dv4tnt",
@@ -352,508 +214,30 @@
"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://dydx-testnet.imperator.co",
"socket":"wss://dydx-testnet.imperator.co"
}
],
"faucet": "https://faucet.v4staging.dydx.exchange",
"validators": [
"https://validator-uswest1.v4staging.dydx.exchange"
],
"0xsquid": "https://testnet.api.squidrouter.com"
},
"links": {
"tos": "https://dydx.exchange/v4-terms",
"privacy": "https://dydx.exchange/privacy",
"mintscan": "https://testnet.mintscan.io/dydx-testnet/txs/{tx_hash}",
"documentation": "https://v4-teacher.vercel.app/",
"community": "https://discord.com/invite/dydx",
"feedback": "https://docs.google.com/forms/d/e/1FAIpQLSezLsWCKvAYDEb7L-2O4wOON1T56xxro9A2Azvl6IxXHP_15Q/viewform",
"blogs": "https://www.dydx.foundation/blog"
},
"wallets": {
"walletconnect": {
"client": {
"name": "dYdX v4",
"description": "dYdX v4 App",
"iconUrl": "/logos/dydx-x.png"
},
"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",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"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": [
"validators":[
"https://dydx-testnet.nodefleet.org",
"https://test-dydx.kingnodes.com",
"https://dydx-rpc.liquify.com/api=8878132/dydx"
"https://test-dydx.kingnodes.com/"
],
"0xsquid": "https://testnet.api.squidrouter.com",
"faucet": "https://faucet.v4testnet.dydx.exchange"
"0xsquid":"https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app",
"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",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"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",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"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",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"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",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"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",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"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]",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"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"
"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"
}
}
}
-464
View File
@@ -1,464 +0,0 @@
[
{
"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": "",
"encoding": "=\"#%/<>?@\\^`{|}:&",
"connections": [
{
"type": "walletConnectV2",
"native": "metamask:",
"universal": "https://metamask.app.link"
}
],
"methods": [
"eth_sendTransaction",
"personal_sign",
"eth_signTypedData",
"wallet_addEthereumChain"
]
},
"userFields": {
"analyticEvent": "METAMASK",
"imageName": "metamask.png"
}
},
{
"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": "",
"encoding": "=\"#%/<>?@\\^`{|}:&",
"connections": [
{
"type": "walletSegue",
"native": "cbwallet:",
"universal": ""
}
],
"methods": [
"eth_sendTransaction",
"personal_sign",
"eth_signTypedData",
"wallet_addEthereumChain"
]
},
"userFields": {
"analyticEvent": "COINBASE_WALLET",
"imageName": "coinbase-wallet.png"
}
},
{
"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": "",
"connections": [
{
"type": "walletConnectV2",
"native": "imtokenv2:",
"universal": ""
}
],
"methods": [
"eth_sendTransaction",
"personal_sign",
"eth_signTypedData"
]
},
"userFields": {
"analyticEvent": "IMTOKEN",
"imageName": "imtoken.png"
}
},
{
"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": "",
"connections": [
{
"type": "walletConnectV2",
"native": "trust:",
"universal": "https://link.trustwallet.com"
}
],
"methods": [
"eth_sendTransaction",
"personal_sign",
"eth_signTypedData"
]
},
"userFields": {
"analyticEvent": "TRUST_WALLET",
"imageName": "trust-wallet.png"
}
},
{
"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": "",
"connections": [
{
"type": "walletConnectV2",
"native": "zerion:",
"universal": ""
}
],
"methods": [
"eth_sendTransaction",
"personal_sign",
"eth_signTypedData"
]
},
"userFields": {
"analyticEvent": "ZERION",
"imageName": "zerion.png"
}
},
{
"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": "",
"connections": [
{
"type": "walletConnectV2",
"native": "tpoutside:",
"universal": ""
}
],
"methods": [
"eth_sendTransaction",
"personal_sign",
"eth_signTypedData"
]
},
"userFields": {
"analyticEvent": "TOKEN_POCKET",
"imageName": "tokenpocket.png"
}
},
{
"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": "",
"connections": [
{
"type": "walletConnectV2",
"native": "rainbow:",
"universal": "https://rnbwapp.com"
}
],
"methods": [
"eth_sendTransaction",
"personal_sign",
"eth_signTypedData"
]
},
"userFields": {
"analyticEvent": "RAINBOW_WALLET",
"imageName": "rainbow-wallet.png"
}
},
{
"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": "",
"connections": [
{
"type": "walletConnectV2",
"native": "oneinch:",
"universal": "https://wallet.1inch.io"
}
],
"methods": [
"eth_sendTransaction",
"personal_sign",
"eth_signTypedData"
]
},
"userFields": {
"analyticEvent": "1INCH",
"imageName": "1inch.png"
}
}
]
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

-19
View File
@@ -1,19 +0,0 @@
#!/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
+3 -1
View File
@@ -67,7 +67,9 @@ const Content = () => {
<Route path={AppRoute.Trade} element={<TradePage />} />
</Route>
<Route path={AppRoute.Markets} element={<MarketsPage />} />
<Route path={AppRoute.Rewards} element={<RewardsPage />} />
{import.meta.env.MODE !== 'production' && (
<Route path={AppRoute.Rewards} element={<RewardsPage />} />
)}
{isTablet && (
<>
<Route path={AppRoute.Alerts} element={<AlertsPage />} />
+83 -29
View File
@@ -24,14 +24,13 @@ import {
import { isMetaMask } from '@/lib/wallet/providers';
import { DydxNetwork, ENVIRONMENT_CONFIG_MAP } from './networks';
// Wallet connection types
export enum WalletConnectionType {
CoinbaseWalletSdk = 'coinbaseWalletSdk',
CosmosSigner = 'CosmosSigner',
InjectedEip1193 = 'injectedEip1193',
WalletConnect1 = 'walletConnect1',
WalletConnect2 = 'walletConnect2',
}
@@ -61,6 +60,10 @@ export const walletConnectionTypes: Record<WalletConnectionType, WalletConnectio
name: 'injected EIP-1193 provider',
wagmiConnectorId: 'injected',
},
[WalletConnectionType.WalletConnect1]: {
name: 'WalletConnect 1.0',
wagmiConnectorId: 'walletConnectLegacy',
},
[WalletConnectionType.WalletConnect2]: {
name: 'WalletConnect 2.0',
wagmiConnectorId: 'walletConnect',
@@ -87,6 +90,7 @@ export enum WalletType {
Rainbow = 'RAINBOW_WALLET',
TokenPocket = 'TOKEN_POCKET',
TrustWallet = 'TRUST_WALLET',
WalletConnect = 'WALLETCONNECT',
WalletConnect2 = 'WALLETCONNECT_2',
// TestWallet = 'TEST_WALLET',
OtherWallet = 'OTHER_WALLET',
@@ -98,6 +102,7 @@ type WalletConfig = {
icon: string;
connectionTypes: WalletConnectionType[];
matchesInjectedEip1193?: (provider: ExternalProvider & any) => boolean;
walletconnect1Name?: string;
walletconnect2Id?: string;
};
@@ -110,6 +115,7 @@ export const wallets: Record<WalletType, WalletConfig> = {
WalletConnectionType.InjectedEip1193,
// WalletConnectionType.CoinbaseWalletSdk,
WalletConnectionType.WalletConnect2,
WalletConnectionType.WalletConnect1,
],
matchesInjectedEip1193: (provider) =>
Object.entries(wallets).every(
@@ -123,23 +129,30 @@ export const wallets: Record<WalletType, WalletConfig> = {
type: WalletType.BitKeep,
stringKey: STRING_KEYS.BITKEEP,
icon: BitkeepIcon,
connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect2],
connectionTypes: [
WalletConnectionType.InjectedEip1193,
WalletConnectionType.WalletConnect2,
WalletConnectionType.WalletConnect1,
],
matchesInjectedEip1193: (provider) => provider.isBitKeep, // isBitKeepChrome, isBitEthereum
walletconnect1Name: 'bitkeep',
walletconnect2Id: '38f5d18bd8522c244bdd70cb4a68e0e718865155811c043f052fb9f1c51de662',
},
[WalletType.BitPie]: {
type: WalletType.BitPie,
stringKey: STRING_KEYS.BITPIE,
icon: BitpieIcon,
connectionTypes: [WalletConnectionType.InjectedEip1193],
connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect1],
matchesInjectedEip1193: (provider) => provider.isBitpie,
walletconnect1Name: 'bitpie',
},
[WalletType.CloverWallet]: {
type: WalletType.CloverWallet,
stringKey: STRING_KEYS.CLOVER_WALLET,
icon: CloverWalletIcon,
connectionTypes: [WalletConnectionType.InjectedEip1193],
connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect1],
matchesInjectedEip1193: (provider) => provider.isClover,
// walletconnect1Name: 'clover',
},
[WalletType.CoinbaseWallet]: {
type: WalletType.CoinbaseWallet,
@@ -148,23 +161,33 @@ export const wallets: Record<WalletType, WalletConfig> = {
connectionTypes: [
WalletConnectionType.CoinbaseWalletSdk,
WalletConnectionType.InjectedEip1193,
WalletConnectionType.WalletConnect2,
WalletConnectionType.WalletConnect1,
],
matchesInjectedEip1193: (provider) => provider.isCoinbaseWallet, // provider.selectedProvider?.isCoinbaseWallet,
walletconnect1Name: 'coinbase',
},
[WalletType.Coin98]: {
type: WalletType.Coin98,
stringKey: STRING_KEYS.COIN98,
icon: Coin98Icon,
connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect2],
connectionTypes: [
WalletConnectionType.InjectedEip1193,
WalletConnectionType.WalletConnect2,
WalletConnectionType.WalletConnect1,
],
matchesInjectedEip1193: (provider) => provider.isCoin98,
walletconnect1Name: 'coin98',
walletconnect2Id: '2a3c89040ac3b723a1972a33a125b1db11e258a6975d3a61252cd64e6ea5ea01',
},
[WalletType.HuobiWallet]: {
type: WalletType.HuobiWallet,
stringKey: STRING_KEYS.HUOBI_WALLET,
icon: HuobiIcon,
connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect2],
connectionTypes: [
WalletConnectionType.InjectedEip1193,
WalletConnectionType.WalletConnect2,
WalletConnectionType.WalletConnect1,
],
matchesInjectedEip1193: (provider) => provider.isHbWallet,
walletconnect2Id: '797c615e2c556b610c048eb35535f212c0dd58de5d03e763120e90a7d1350a77',
},
@@ -172,56 +195,88 @@ export const wallets: Record<WalletType, WalletConfig> = {
type: WalletType.ImToken,
stringKey: STRING_KEYS.IMTOKEN,
icon: ImTokenIcon,
connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect2],
connectionTypes: [
WalletConnectionType.InjectedEip1193,
WalletConnectionType.WalletConnect2,
WalletConnectionType.WalletConnect1,
],
matchesInjectedEip1193: (provider) => provider.isImToken,
walletconnect1Name: 'imtoken',
walletconnect2Id: 'ef333840daf915aafdc4a004525502d6d49d77bd9c65e0642dbaefb3c2893bef',
},
[WalletType.MathWallet]: {
type: WalletType.MathWallet,
stringKey: STRING_KEYS.MATH_WALLET,
icon: MathWalletIcon,
connectionTypes: [WalletConnectionType.InjectedEip1193],
connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect1],
matchesInjectedEip1193: (provider) => provider.isMathWallet,
walletconnect1Name: 'math',
walletconnect2Id: '7674bb4e353bf52886768a3ddc2a4562ce2f4191c80831291218ebd90f5f5e26',
},
[WalletType.MetaMask]: {
type: WalletType.MetaMask,
stringKey: STRING_KEYS.METAMASK,
icon: MetaMaskIcon,
connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect2],
connectionTypes: [
WalletConnectionType.InjectedEip1193,
WalletConnectionType.WalletConnect2,
WalletConnectionType.WalletConnect1,
],
matchesInjectedEip1193: isMetaMask,
walletconnect1Name: 'metamask',
walletconnect2Id: 'c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96',
},
[WalletType.Rainbow]: {
type: WalletType.Rainbow,
stringKey: STRING_KEYS.RAINBOW_WALLET,
icon: RainbowIcon,
connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect2],
connectionTypes: [
WalletConnectionType.InjectedEip1193,
WalletConnectionType.WalletConnect2,
WalletConnectionType.WalletConnect1,
],
matchesInjectedEip1193: (provider) => provider.isRainbowWallet,
walletconnect1Name: 'rainbow',
walletconnect2Id: '1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369',
},
[WalletType.TokenPocket]: {
type: WalletType.TokenPocket,
stringKey: STRING_KEYS.TOKEN_POCKET,
icon: TokenPocketIcon,
connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect2],
connectionTypes: [
WalletConnectionType.InjectedEip1193,
WalletConnectionType.WalletConnect2,
WalletConnectionType.WalletConnect1,
],
matchesInjectedEip1193: (provider) => provider.isTokenPocket,
walletconnect1Name: 'tokenpocket',
walletconnect2Id: '20459438007b75f4f4acb98bf29aa3b800550309646d375da5fd4aac6c2a2c66',
},
[WalletType.TrustWallet]: {
type: WalletType.TrustWallet,
stringKey: STRING_KEYS.TRUST_WALLET,
icon: TrustWalletIcon,
connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect2],
connectionTypes: [
WalletConnectionType.InjectedEip1193,
WalletConnectionType.WalletConnect2,
WalletConnectionType.WalletConnect1,
],
matchesInjectedEip1193: (provider) => provider.isTrust,
walletconnect1Name: 'trust',
walletconnect2Id: '4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0',
},
[WalletType.WalletConnect2]: {
type: WalletType.WalletConnect2,
type: WalletType.WalletConnect,
stringKey: STRING_KEYS.WALLET_CONNECT_2,
icon: WalletConnectIcon,
connectionTypes: [WalletConnectionType.WalletConnect2],
},
[WalletType.WalletConnect]: {
type: WalletType.WalletConnect,
stringKey: STRING_KEYS.WALLET_CONNECT,
icon: WalletConnectIcon,
connectionTypes: [WalletConnectionType.WalletConnect1],
},
[WalletType.Keplr]: {
type: WalletType.Keplr,
stringKey: STRING_KEYS.KEPLR,
@@ -263,21 +318,20 @@ export type WalletConnection = {
export const COSMOS_DERIVATION_PATH = "m/44'/118'/0'/0/0";
/**
* @description typed data to sign for dYdX Chain onboarding
* @description typed data to sign for v4 onboarding
*/
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 const SIGN_TYPED_DATA = {
primaryType: 'dYdX',
domain: {
name: 'dYdX V4',
},
types: {
dYdX: [{ name: 'action', type: 'string' }],
},
message: {
action: 'dYdX V4 Onboarding',
},
} as const;
export type PrivateInformation = ReturnType<typeof onboarding.deriveHDKeyFromEthereumSignature>;
+13 -9
View File
@@ -2,23 +2,27 @@ import { WalletType } from '@/constants/wallets';
import { isTruthy } from '@/lib/isTruthy';
import { useSelectedNetwork } from './useSelectedNetwork';
export const useDisplayedWallets = () => {
const { selectedNetwork } = useSelectedNetwork();
return [
WalletType.MetaMask,
import.meta.env.MODE !== 'production' && WalletType.Keplr,
WalletType.WalletConnect2,
WalletType.WalletConnect,
WalletType.CoinbaseWallet,
// Hide these wallet options until they can be properly tested on mainnet
// WalletType.ImToken,
// WalletType.Rainbow,
// WalletType.TrustWallet,
// WalletType.HuobiWallet,
// WalletType.BitKeep,
// WalletType.Coin98,
WalletType.ImToken,
WalletType.Rainbow,
WalletType.TrustWallet,
WalletType.HuobiWallet,
WalletType.BitKeep,
WalletType.Coin98,
WalletType.OtherWallet,
].filter(isTruthy);
+5 -6
View File
@@ -110,18 +110,18 @@ export const notificationTypes = [
const stringGetter = useStringGetter();
const { transferNotifications } = useLocalNotifications();
const getTitleStringKey = useCallback((type: 'deposit' | 'withdrawal', finished: boolean) => {
const getTitleStringKey = useCallback((type: 'deposit' | 'withdraw', finished: boolean) => {
if (type === 'deposit' && !finished) return STRING_KEYS.DEPOSIT_IN_PROGRESS;
if (type === 'deposit' && finished) return STRING_KEYS.DEPOSIT;
if (type === 'withdrawal' && !finished) return STRING_KEYS.WITHDRAW_IN_PROGRESS;
if (type === 'withdraw' && !finished) return STRING_KEYS.WITHDRAW_IN_PROGRESS;
return STRING_KEYS.WITHDRAW;
}, []);
useEffect(() => {
for (const transfer of transferNotifications) {
const { fromChainId, status, txHash, toAmount } = transfer;
const { toChainId, status, txHash, toAmount } = transfer;
const finished = Boolean(status) && status?.squidTransactionStatus !== 'ongoing';
const type = fromChainId === TESTNET_CHAIN_ID ? 'withdrawal' : 'deposit';
const type = toChainId === TESTNET_CHAIN_ID ? 'deposit' : 'withdraw';
// @ts-ignore status.errors is not in the type definition but can be returned
const error = status?.errors?.length ? status?.errors[0] : status?.error;
@@ -154,7 +154,6 @@ export const notificationTypes = [
description: description,
customContent: (
<TransferStatusToast
type={type}
toAmount={transfer.toAmount}
triggeredAt={transfer.triggeredAt}
status={transfer.status}
@@ -163,7 +162,7 @@ export const notificationTypes = [
customMenuContent: !finished && (
<div>
{description}
<TransferStatusSteps status={transfer.status} type={type} />
<TransferStatusSteps status={transfer.status} />
</div>
),
toastSensitivity: 'foreground',
+5 -8
View File
@@ -35,7 +35,6 @@ 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;
@@ -85,7 +84,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;
}
@@ -109,12 +108,10 @@ class AbacusStateNotifier implements AbacusStateNotificationProtocol {
dispatch(
setMarkets({
markets: Object.fromEntries(
(marketIds || updatedState.marketIds()?.toArray() || [])
.map((marketId: string) => {
const marketData = updatedState.market(marketId);
return [marketId, marketData];
})
.filter(isTruthy)
(marketIds || updatedState.marketIds()?.toArray() || []).map((marketId: string) => {
const marketData = updatedState.market(marketId);
return [marketId, marketData];
})
) as Record<string, PerpetualMarket>,
update: !!marketIds,
})
+28 -2
View File
@@ -87,15 +87,24 @@ const injectedConnectorOptions = {
},
};
const walletconnect1ConnectorOptions = {
chains,
options: {
bridge: import.meta.env.VITE_WALLETCONNECT1_BRIDGE,
qrcode: true,
},
};
const walletconnect2ConnectorOptions: ConstructorParameters<typeof WalletConnectConnector>[0] = {
chains,
options: {
projectId: import.meta.env.VITE_WALLETCONNECT2_PROJECT_ID,
metadata: {
// TODO: update to local URLs/images
name: 'dYdX',
description: '',
url: import.meta.env.VITE_BASE_URL,
icons: [`${import.meta.env.VITE_BASE_URL}/cbw-image.png}`],
url: 'https://trade.dydx.exchange',
icons: ['https://trade.dydx.exchange/cbw-image.png'],
},
showQrModal: true,
qrModalOptions: {
@@ -134,6 +143,7 @@ const connectors = [
reloadOnDisconnect: false,
},
}),
new WalletConnectLegacyConnector(walletconnect1ConnectorOptions),
new WalletConnectConnector(walletconnect2ConnectorOptions),
new InjectedConnector(injectedConnectorOptions),
];
@@ -156,6 +166,19 @@ const createInjectedConnectorWithProvider = (provider: ExternalProvider) =>
provider as unknown as Awaited<ReturnType<InjectedConnector['getProvider']>>;
})(injectedConnectorOptions) as InjectedConnector;
// Create a custom wagmi WalletConnectLegacyConnector with a modal showing only wallet links matching the given name
const createWalletConnect1ConnectorWithName = (walletconnect1Name: string) =>
new WalletConnectLegacyConnector({
...walletconnect1ConnectorOptions,
options: {
...walletconnect1ConnectorOptions.options,
qrcodeModalOptions: {
desktopLinks: [walletconnect1Name],
mobileLinks: [walletconnect1Name],
},
},
});
const createWalletConnect2ConnectorWithId = (walletconnect2Id: string) =>
new WalletConnectConnector({
...walletconnect2ConnectorOptions,
@@ -191,6 +214,9 @@ export const resolveWagmiConnector = ({
return walletConnection.type === WalletConnectionType.InjectedEip1193 && walletConnection.provider
? createInjectedConnectorWithProvider(walletConnection.provider)
: walletConnection.type === WalletConnectionType.WalletConnect1 &&
walletConfig.walletconnect1Name
? createWalletConnect1ConnectorWithName(walletConfig.walletconnect1Name)
: walletConnection.type === WalletConnectionType.WalletConnect2 && walletConfig.walletconnect2Id
? createWalletConnect2ConnectorWithId(walletConfig.walletconnect2Id)
: connectors.find(({ id }: { id: string }) => id === walletConnectionConfig.wagmiConnectorId);
+6
View File
@@ -45,6 +45,12 @@ export const getWalletConnection = ({
break;
}
case WalletConnectionType.WalletConnect1: {
return {
type: WalletConnectionType.WalletConnect1,
};
}
case WalletConnectionType.WalletConnect2: {
return {
type: WalletConnectionType.WalletConnect2,
+4 -2
View File
@@ -139,9 +139,11 @@ export const MarketDetails: React.FC = () => {
</Styled.WrapRow>
<Styled.MarketDescription>
{primaryDescriptionKey && <p>{stringGetter({ key: `APP.${primaryDescriptionKey}` })}</p>}
{primaryDescriptionKey && (
<p>{stringGetter({ key: STRING_KEYS[primaryDescriptionKey as StringKey] })}</p>
)}
{secondaryDescriptionKey && (
<p>{stringGetter({ key: `APP.${secondaryDescriptionKey}` })}</p>
<p>{stringGetter({ key: STRING_KEYS[secondaryDescriptionKey as StringKey] })}</p>
)}
</Styled.MarketDescription>
+8 -13
View File
@@ -1,5 +1,6 @@
import { useCallback, useState, useMemo } from 'react';
import styled, { type AnyStyledComponent } from 'styled-components';
import { TESTNET_CHAIN_ID } from '@dydxprotocol/v4-client-js';
import { Root, Trigger, Content } from '@radix-ui/react-collapsible';
import { StatusResponse } from '@0xsquid/sdk';
@@ -20,14 +21,12 @@ import { LoadingDots } from '@/components/Loading/LoadingDots';
import { layoutMixins } from '@/styles/layoutMixins';
type ElementProps = {
type: 'withdrawal' | 'deposit';
toAmount?: number;
triggeredAt?: number;
status?: StatusResponse;
};
export const TransferStatusToast = ({
type,
toAmount,
triggeredAt = Date.now(),
status,
@@ -39,6 +38,11 @@ export const TransferStatusToast = ({
// @ts-ignore status.errors is not in the type definition but can be returned
const error = status?.errors?.length ? status?.errors[0] : status?.error;
const type = useMemo(
() => (status?.toChain?.chainData?.chainId === TESTNET_CHAIN_ID ? 'deposit' : 'withdrawal'),
[status]
);
const updateSecondsLeft = useCallback(() => {
const fromChainEta = (status?.fromChain?.chainData?.estimatedRouteDuration || 0) * 1000;
const toChainEta = (status?.toChain?.chainData?.estimatedRouteDuration || 0) * 1000;
@@ -49,15 +53,6 @@ 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
@@ -65,14 +60,14 @@ export const TransferStatusToast = ({
side="bottom"
slotReceipt={
<Styled.Receipt>
<TransferStatusSteps status={status} type={type} />
<TransferStatusSteps status={status} />
</Styled.Receipt>
}
>
<Styled.BridgingStatus>
<Styled.Status>
{stringGetter({
key: statusString,
key: type === 'deposit' ? STRING_KEYS.DEPOSIT_STATUS : STRING_KEYS.WITHDRAW_STATUS,
params: {
AMOUNT_USD: <Styled.InlineOutput type={OutputType.Fiat} value={toAmount} />,
ESTIMATED_DURATION: (
+5 -8
View File
@@ -1,6 +1,7 @@
import { useMemo } from 'react';
import styled, { css, keyframes, type AnyStyledComponent } from 'styled-components';
import { StatusResponse } from '@0xsquid/sdk';
import { TESTNET_CHAIN_ID } from '@dydxprotocol/v4-client-js';
import { useStringGetter } from '@/hooks';
@@ -14,7 +15,6 @@ import { STRING_KEYS } from '@/constants/localization';
type ElementProps = {
status?: StatusResponse;
type: 'withdrawal' | 'deposit';
};
enum TransferStatusStep {
@@ -24,13 +24,14 @@ enum TransferStatusStep {
Complete,
}
export const TransferStatusSteps = ({ status, type }: ElementProps) => {
export const TransferStatusSteps = ({ status }: ElementProps) => {
const stringGetter = useStringGetter();
const { currentStep, steps } = useMemo(() => {
const { currentStep, steps, type } = useMemo(() => {
const routeStatus = status?.routeStatus;
const fromChain = status?.fromChain?.chainData?.chainId;
const toChain = status?.toChain?.chainData?.chainId;
const type = toChain === TESTNET_CHAIN_ID ? 'deposit' : 'withdrawal';
const steps = [
{
@@ -50,7 +51,7 @@ export const TransferStatusSteps = ({ status, type }: ElementProps) => {
label: stringGetter({
key: type === 'deposit' ? STRING_KEYS.DEPOSIT_TO_CHAIN : STRING_KEYS.WITHDRAW_TO_CHAIN,
params: {
CHAIN: type === 'deposit' ? 'dYdX' : status?.toChain?.chainData?.chainName,
CHAIN: status?.toChain?.chainData?.chainName,
},
}),
step: TransferStatusStep.ToChain,
@@ -73,10 +74,6 @@ export const TransferStatusSteps = ({ status, type }: ElementProps) => {
currentStep = TransferStatusStep.FromChain;
}
if (status?.squidTransactionStatus === 'success') {
currentStep = TransferStatusStep.Complete;
}
return {
currentStep,
steps,
+2 -2
View File
@@ -27,9 +27,9 @@ export const DisconnectDialog = ({ setIsOpen }: ElementProps) => {
};
return (
<Dialog isOpen setIsOpen={setIsOpen} title={stringGetter({ key: STRING_KEYS.DISCONNECT })}>
<Dialog isOpen setIsOpen={setIsOpen} title="Disconnect">
<Styled.Content>
<p>{stringGetter({ key: STRING_KEYS.DISCONNECT_CONFIRMATION })}</p>
<p>Are you sure you want to disconnect your account?</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.dydx.academy/video/defi-wallet`;
const aboutWalletsLink = `https://www.dydxacademy.info/educational-video-series/onboarding-to-defi-with-dydx`;
export const ChooseWallet = () => {
const stringGetter = useStringGetter();
@@ -34,14 +34,7 @@ export const ChooseWallet = () => {
<Styled.AlertMessage type={AlertType.Error}>
{
<h4>
{stringGetter({
key: STRING_KEYS.COULD_NOT_CONNECT,
params: {
WALLET: stringGetter({
key: wallets[selectedWalletType].stringKey,
}),
},
})}
Couldn't connect to {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, getSignTypedData } from '@/constants/wallets';
import { DydxAddress, SIGN_TYPED_DATA } from '@/constants/wallets';
import { useAccounts, useBreakpoints, useDydxClient, useStringGetter } from '@/hooks';
import { useMatchingEvmNetwork } from '@/hooks/useMatchingEvmNetwork';
@@ -85,11 +85,10 @@ export const GenerateKeys = ({
EvmDerivedAccountStatus.Derived,
].includes(status);
const signTypedData = getSignTypedData(selectedNetwork);
const { signTypedDataAsync } = useSignTypedData({
...signTypedData,
...SIGN_TYPED_DATA,
domain: {
...signTypedData.domain,
...SIGN_TYPED_DATA.domain,
chainId,
},
});
@@ -166,8 +165,8 @@ export const GenerateKeys = ({
{[
{
status: EvmDerivedAccountStatus.Deriving,
title: stringGetter({ key: STRING_KEYS.GENERATE_DYDX_WALLET }),
description: stringGetter({ key: STRING_KEYS.VERIFY_WALLET_OWNERSHIP }),
title: stringGetter({ key: STRING_KEYS.GENERATE_COSMOS_WALLET }),
description: stringGetter({ key: STRING_KEYS.GENERATE_COSMOS_WALLET }),
},
status === EvmDerivedAccountStatus.EnsuringDeterminism && {
status: EvmDerivedAccountStatus.EnsuringDeterminism,
@@ -168,19 +168,6 @@ 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,7 +4,6 @@ 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';
@@ -27,7 +26,6 @@ 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';
@@ -61,8 +59,6 @@ export const WithdrawForm = () => {
resources,
} = useSelector(getTransferInputs, shallowEqual) || {};
const isValidAddress = toAddress && isAddress(toAddress);
const toToken = useMemo(
() => (token ? resources?.tokenResources?.get(token) : undefined),
[token, resources]
@@ -183,6 +179,7 @@ export const WithdrawForm = () => {
const onSelectChain = useCallback((chain: string) => {
if (chain) {
abacusStateManager.clearTransferInputValues();
abacusStateManager.setTransferValue({
field: TransferInputField.chain,
value: chain,
@@ -193,6 +190,7 @@ export const WithdrawForm = () => {
const onSelectToken = useCallback((token: TransferInputTokenResource) => {
if (token) {
abacusStateManager.clearTransferInputValues();
abacusStateManager.setTransferValue({
field: TransferInputField.token,
value: token.address,
@@ -267,12 +265,7 @@ export const WithdrawForm = () => {
placeholder={stringGetter({ key: STRING_KEYS.ADDRESS })}
onChange={onChangeAddress}
value={toAddress || ''}
label={
<span>
{stringGetter({ key: STRING_KEYS.DESTINATION })}{' '}
{isValidAddress ? <Styled.CheckIcon iconName={IconName.Check} /> : null}
</span>
}
label={stringGetter({ key: STRING_KEYS.DESTINATION })}
/>
<ChainSelectMenu
label={stringGetter({ key: STRING_KEYS.NETWORK })}
@@ -349,10 +342,3 @@ 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,19 +1,14 @@
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';
@@ -21,7 +16,6 @@ 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';
@@ -55,14 +49,22 @@ 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') {
@@ -96,27 +98,9 @@ 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.ACCOUNT_LEVERAGE })}</span>,
label: <span>{stringGetter({ key: STRING_KEYS.LEVERAGE })}</span>,
value: (
<Styled.DiffOutput
type={OutputType.Multiple}
@@ -153,19 +137,25 @@ export const WithdrawButtonAndReceipt = ({
/>
),
},
{
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) },
})}
/>
),
},
// 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)}
// />
// ),
// },
];
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, StringKey } from '@/constants/localization';
import { STRING_KEYS } 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, goodTil, postOnly, reduceOnly, timeInForce } = inputTradeData || {};
const { execution, goodUntil, postOnly, reduceOnly, timeInForce } = inputTradeData || {};
const { executionOptions, needsGoodUntil, needsPostOnly, needsReduceOnly, timeInForceOptions } =
currentTradeFormConfig || {};
const { duration, unit } = goodTil || {};
const { duration, unit } = goodUntil || {};
const needsExecution = executionOptions || needsPostOnly || needsReduceOnly;
@@ -62,7 +62,7 @@ export const AdvancedTradeOptions = () => {
<Styled.SelectItem
key={type}
value={type}
label={stringGetter({ key: stringKey as StringKey })}
label={stringGetter({ key: stringKey })}
/>
))}
</Styled.SelectMenu>
@@ -76,7 +76,7 @@ export const AdvancedTradeOptions = () => {
onChange={({ value }: NumberFormatValues) => {
abacusStateManager.setTradeValue({
value: Number(value),
field: TradeInputField.goodTilDuration,
field: TradeInputField.goodUntilDuration,
});
}}
value={duration ?? ''}
@@ -86,7 +86,7 @@ export const AdvancedTradeOptions = () => {
onValueChange={(goodTilTimeTimescale: string) => {
abacusStateManager.setTradeValue({
value: goodTilTimeTimescale,
field: TradeInputField.goodTilUnit,
field: TradeInputField.goodUntilUnit,
});
}}
>
@@ -121,7 +121,7 @@ export const AdvancedTradeOptions = () => {
<Styled.SelectItem
key={type}
value={type}
label={stringGetter({ key: stringKey as StringKey })}
label={stringGetter({ key: stringKey })}
/>
))}
</Styled.SelectMenu>