Compare commits

..
Author SHA1 Message Date
Bill He 73eb7aff96 remove wc1 2023-10-12 15:22:42 -07:00
Bill He 6a3c4ec7f6 remove .env 2023-10-12 15:17:56 -07:00
Bill He 47b6618299 gitignore .env 2023-10-12 15:16:11 -07:00
Bill He def44ad66e remove WC 1 2023-10-12 15:07:49 -07:00
Bill He a6eb90952a Hide wallet options 2023-10-12 09:33:35 -07:00
14 changed files with 481 additions and 503 deletions
+1 -1
View File
@@ -40,7 +40,7 @@
"@cosmjs/tendermint-rpc": "^0.31.0", "@cosmjs/tendermint-rpc": "^0.31.0",
"@dydxprotocol/v4-abacus": "^0.6.4", "@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.28", "@dydxprotocol/v4-localization": "^0.1.24",
"@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",
+8 -8
View File
@@ -1,5 +1,9 @@
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
@@ -29,8 +33,8 @@ dependencies:
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.28 specifier: ^0.1.24
version: 0.1.28 version: 0.1.24
'@ethersproject/providers': '@ethersproject/providers':
specifier: ^5.7.2 specifier: ^5.7.2
version: 5.7.2 version: 5.7.2
@@ -1006,8 +1010,8 @@ packages:
- utf-8-validate - utf-8-validate
dev: false dev: false
/@dydxprotocol/v4-localization@0.1.28: /@dydxprotocol/v4-localization@0.1.24:
resolution: {integrity: sha512-g6LwjX7EIRm9HISfSX0H6yhktBCZby5opP/yI2aIUvn2OYyB25WcjLEuEvzW5Bh9XXiLijgLf3Tk91wPKWuFbA==} resolution: {integrity: sha512-zSiu8+/6BWNWZXxe73zUp/UjuLG1Cp5UuhXKtbATqqkeZyVCs01QxbBCTs1MLfgsLh02IrfhXCPHvXnzZyReEw==}
dev: false dev: false
/@dydxprotocol/v4-proto@0.2.1: /@dydxprotocol/v4-proto@0.2.1:
@@ -14095,7 +14099,3 @@ 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.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 193 KiB

-26
View File
@@ -35,8 +35,6 @@
"name": "v4 Dev", "name": "v4 Dev",
"ethereumChainId": "5", "ethereumChainId": "5",
"dydxChainId": "dydxprotocol-testnet", "dydxChainId": "dydxprotocol-testnet",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"isMainNet": false, "isMainNet": false,
"tokens": { "tokens": {
"chain": { "chain": {
@@ -96,8 +94,6 @@
"name": "v4 Dev 2", "name": "v4 Dev 2",
"ethereumChainId": "5", "ethereumChainId": "5",
"dydxChainId": "dydxprotocol-testnet", "dydxChainId": "dydxprotocol-testnet",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"isMainNet": false, "isMainNet": false,
"tokens": { "tokens": {
"chain": { "chain": {
@@ -156,8 +152,6 @@
"name": "v4 Dev 4", "name": "v4 Dev 4",
"ethereumChainId": "5", "ethereumChainId": "5",
"dydxChainId": "dydxprotocol-testnet", "dydxChainId": "dydxprotocol-testnet",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"isMainNet": false, "isMainNet": false,
"tokens": { "tokens": {
"chain": { "chain": {
@@ -216,8 +210,6 @@
"name": "v4 Dev 5", "name": "v4 Dev 5",
"ethereumChainId": "5", "ethereumChainId": "5",
"dydxChainId": "dydxprotocol-testnet", "dydxChainId": "dydxprotocol-testnet",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"isMainNet": false, "isMainNet": false,
"tokens": { "tokens": {
"chain": { "chain": {
@@ -276,8 +268,6 @@
"name": "v4 Staging", "name": "v4 Staging",
"ethereumChainId": "5", "ethereumChainId": "5",
"dydxChainId": "dydxprotocol-testnet", "dydxChainId": "dydxprotocol-testnet",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"isMainNet": false, "isMainNet": false,
"tokens": { "tokens": {
"chain": { "chain": {
@@ -340,8 +330,6 @@
"name": "v4 Staging West", "name": "v4 Staging West",
"ethereumChainId": "5", "ethereumChainId": "5",
"dydxChainId": "dydxprotocol-testnet", "dydxChainId": "dydxprotocol-testnet",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"isMainNet": false, "isMainNet": false,
"tokens": { "tokens": {
"chain": { "chain": {
@@ -404,8 +392,6 @@
"name": "v4 Public Testnet", "name": "v4 Public Testnet",
"ethereumChainId": "5", "ethereumChainId": "5",
"dydxChainId": "dydx-testnet-3", "dydxChainId": "dydx-testnet-3",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"isMainNet": false, "isMainNet": false,
"tokens": { "tokens": {
"chain": { "chain": {
@@ -470,8 +456,6 @@
"name": "v4 Public Testnet/dYdX", "name": "v4 Public Testnet/dYdX",
"ethereumChainId": "5", "ethereumChainId": "5",
"dydxChainId": "dydx-testnet-3", "dydxChainId": "dydx-testnet-3",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"isMainNet": false, "isMainNet": false,
"tokens": { "tokens": {
"chain": { "chain": {
@@ -535,8 +519,6 @@
"name": "v4 Public Testnet/DSRV", "name": "v4 Public Testnet/DSRV",
"ethereumChainId": "5", "ethereumChainId": "5",
"dydxChainId": "dydx-testnet-3", "dydxChainId": "dydx-testnet-3",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"isMainNet": false, "isMainNet": false,
"tokens": { "tokens": {
"chain": { "chain": {
@@ -600,8 +582,6 @@
"name": "v4 Public Testnet/nodefleet", "name": "v4 Public Testnet/nodefleet",
"ethereumChainId": "5", "ethereumChainId": "5",
"dydxChainId": "dydx-testnet-3", "dydxChainId": "dydx-testnet-3",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"isMainNet": false, "isMainNet": false,
"tokens": { "tokens": {
"chain": { "chain": {
@@ -665,8 +645,6 @@
"name": "v4 Public Testnet/KingNodes", "name": "v4 Public Testnet/KingNodes",
"ethereumChainId": "5", "ethereumChainId": "5",
"dydxChainId": "dydx-testnet-3", "dydxChainId": "dydx-testnet-3",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"isMainNet": false, "isMainNet": false,
"tokens": { "tokens": {
"chain": { "chain": {
@@ -730,8 +708,6 @@
"name": "v4 Public Testnet/Liquify", "name": "v4 Public Testnet/Liquify",
"ethereumChainId": "5", "ethereumChainId": "5",
"dydxChainId": "dydx-testnet-3", "dydxChainId": "dydx-testnet-3",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"isMainNet": false, "isMainNet": false,
"tokens": { "tokens": {
"chain": { "chain": {
@@ -795,8 +771,6 @@
"name": "v4", "name": "v4",
"ethereumChainId": "1", "ethereumChainId": "1",
"dydxChainId": "[mainnet chain id]", "dydxChainId": "[mainnet chain id]",
"chainName": "dYdX Chain",
"chainLogo": "dydx-chain.png",
"isMainNet": true, "isMainNet": true,
"tokens": { "tokens": {
"comment": "Change according to mainnet release", "comment": "Change according to mainnet release",
+449 -439
View File
@@ -1,464 +1,474 @@
[ [
{ {
"id": "c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96", "id":"c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96",
"name": "MetaMask", "name":"MetaMask",
"description": "", "description":"",
"homepage": "https://metamask.io/", "homepage":"https://metamask.io/",
"chains": [ "chains":[
"eip155:1", "eip155:1",
"eip155:42161", "eip155:42161",
"eip155:43114" "eip155:43114"
], ],
"versions": [ "versions":[
"1" "1"
], ],
"app": { "app":{
"browser": "", "browser":"",
"ios": "https://apps.apple.com/us/app/metamask/id1438144202", "ios":"https://apps.apple.com/us/app/metamask/id1438144202",
"android": "https://play.google.com/store/apps/details?id=io.metamask", "android":"https://play.google.com/store/apps/details?id=io.metamask",
"mac": "", "mac":"",
"windows": "", "windows":"",
"linux": "" "linux":""
}, },
"mobile": { "mobile":{
"native": "metamask:", "native":"metamask:",
"universal": "https://metamask.app.link" "universal":"https://metamask.app.link"
}, },
"desktop": { "desktop":{
"native": "", "native":"",
"universal": "" "universal":""
}, },
"metadata": { "metadata":{
"shortName": "MetaMask", "shortName":"MetaMask",
"colors": { "colors":{
"primary": "rgb(255, 255, 255)", "primary":"rgb(255, 255, 255)",
"secondary": "" "secondary":""
}
},
"config": {
"comment": "MetaMask",
"iosMinVersion": "0",
"imageUrl": "",
"encoding": "=\"#%/<>?@\\^`{|}:&",
"connections": [
{
"type": "walletConnectV2",
"native": "metamask:",
"universal": "https://metamask.app.link"
} }
], },
"methods": [ "config":{
"eth_sendTransaction", "comment":"MetaMask",
"personal_sign", "iosMinVersion":"0",
"eth_signTypedData", "imageUrl":"https://v4.testnet.dydx.exchange/wallets/metamask.png",
"wallet_addEthereumChain" "image":"metamask.png",
] "encoding":"=\"#%/<>?@\\^`{|}:&",
}, "connections":[
"userFields": { {
"analyticEvent": "METAMASK", "type":"walletConnectV2",
"imageName": "metamask.png" "native":"metamask:",
} "universal":"https://metamask.app.link"
}
]
},
"userFields":{
"analyticEvent":"METAMASK"
}
}, },
{ {
"id": "coinbase-wallet", "id":"coinbase-wallet",
"name": "Coinbase Wallet", "name":"Coinbase Wallet",
"description": "", "description":"",
"homepage": "https://www.coinbase.com/wallet", "homepage":"https://www.coinbase.com/wallet",
"chains": [ "chains":[
"eip155:1" "eip155:1"
], ],
"versions": [ "versions":[
"1" "1"
], ],
"app": { "app":{
"browser": "", "browser":"",
"ios": "https://apps.apple.com/us/app/coinbase-wallet-nfts-crypto/id1278383455", "ios":"https://apps.apple.com/us/app/coinbase-wallet-nfts-crypto/id1278383455",
"android": "https://play.google.com/store/apps/details?id=org.toshi", "android":"https://play.google.com/store/apps/details?id=org.toshi",
"mac": "", "mac":"",
"windows": "", "windows":"",
"linux": "" "linux":""
}, },
"mobile": { "mobile":{
"native": "cbwallet:", "native":"cbwallet:",
"universal": "" "universal":""
}, },
"desktop": { "desktop":{
"native": "", "native":"",
"universal": "" "universal":""
}, },
"metadata": { "metadata":{
"shortName": "Coinbase", "shortName":"Coinbase",
"colors": { "colors":{
"primary": "rgb(255, 255, 255)", "primary":"rgb(255, 255, 255)",
"secondary": "" "secondary":""
}
},
"config": {
"comment": "Coinbase",
"iosMinVersion": "1.8.0",
"imageUrl": "",
"encoding": "=\"#%/<>?@\\^`{|}:&",
"connections": [
{
"type": "walletSegue",
"native": "cbwallet:",
"universal": ""
} }
], },
"methods": [ "config":{
"eth_sendTransaction", "comment":"Coinbase",
"personal_sign", "iosMinVersion":"1.8.0",
"eth_signTypedData", "imageUrl":"https://v4.testnet.dydx.exchange/wallets/coinbase-wallet.png",
"wallet_addEthereumChain" "image":"coinbase-wallet.png",
] "encoding":"=\"#%/<>?@\\^`{|}:&",
}, "connections":[
"userFields": { {
"analyticEvent": "COINBASE_WALLET", "type":"walletSegue",
"imageName": "coinbase-wallet.png" "native":"cbwallet:",
} "universal":""
}
]
},
"userFields":{
"analyticEvent":"COINBASE_WALLET"
}
}, },
{ {
"id": "9d373b43ad4d2cf190fb1a774ec964a1addf406d6fd24af94ab7596e58c291b2", "id":"9d373b43ad4d2cf190fb1a774ec964a1addf406d6fd24af94ab7596e58c291b2",
"name": "imToken", "name":"imToken",
"description": "", "description":"",
"homepage": "https://token.im/", "homepage":"https://token.im/",
"chains": [ "chains":[
"eip155:1" "eip155:1"
], ],
"versions": [ "versions":[
"1" "1"
], ],
"app": { "app":{
"browser": "", "browser":"",
"ios": "https://itunes.apple.com/us/app/imtoken2/id1384798940", "ios":"https://itunes.apple.com/us/app/imtoken2/id1384798940",
"android": "https://play.google.com/store/apps/details?id=im.token.app", "android":"https://play.google.com/store/apps/details?id=im.token.app",
"mac": "", "mac":"",
"windows": "", "windows":"",
"linux": "" "linux":""
}, },
"mobile": { "mobile":{
"native": "imtokenv2:", "native":"imtokenv2:",
"universal": "" "universal":""
}, },
"desktop": { "desktop":{
"native": "", "native":"",
"universal": "" "universal":""
}, },
"metadata": { "metadata":{
"shortName": "imToken", "shortName":"imToken",
"colors": { "colors":{
"primary": "rgb(255, 255, 255)", "primary":"rgb(255, 255, 255)",
"secondary": "" "secondary":""
}
},
"config": {
"comment": "imToken",
"iosMinVersion": "0",
"imageUrl": "",
"connections": [
{
"type": "walletConnectV2",
"native": "imtokenv2:",
"universal": ""
} }
], },
"methods": [ "config":{
"eth_sendTransaction", "comment":"imToken",
"personal_sign", "iosMinVersion":"0",
"eth_signTypedData" "imageUrl":"https://v4.testnet.dydx.exchange/wallets/imtoken.png",
] "image":"imtoken.png",
}, "connections":[
"userFields": { {
"analyticEvent": "IMTOKEN", "type":"walletConnect",
"imageName": "imtoken.png" "native":"imtokenv2:",
} "universal":""
}
]
},
"userFields":{
"analyticEvent":"IMTOKEN"
}
}, },
{ {
"id": "4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0", "id":"4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0",
"name": "Trust Wallet", "name":"Trust Wallet",
"description": "", "description":"",
"homepage": "https://trustwallet.com/", "homepage":"https://trustwallet.com/",
"chains": [ "chains":[
"eip155:1", "eip155:1",
"eip155:42161", "eip155:42161",
"eip155:43114" "eip155:43114"
], ],
"versions": [ "versions":[
"1" "1"
], ],
"app": { "app":{
"browser": "", "browser":"",
"ios": "https://apps.apple.com/app/apple-store/id1288339409", "ios":"https://apps.apple.com/app/apple-store/id1288339409",
"android": "https://play.google.com/store/apps/details?id=com.wallet.crypto.trustapp", "android":"https://play.google.com/store/apps/details?id=com.wallet.crypto.trustapp",
"mac": "", "mac":"",
"windows": "", "windows":"",
"linux": "" "linux":""
}, },
"mobile": { "mobile":{
"native": "trust:", "native":"trust:",
"universal": "https://link.trustwallet.com" "universal":"https://link.trustwallet.com"
}, },
"desktop": { "desktop":{
"native": "", "native":"",
"universal": "" "universal":""
}, },
"metadata": { "metadata":{
"shortName": "Trust", "shortName":"Trust",
"colors": { "colors":{
"primary": "rgb(51, 117, 187)", "primary":"rgb(51, 117, 187)",
"secondary": "" "secondary":""
}
},
"config": {
"comment": "Trust Wallet",
"iosMinVersion": "0",
"encoding": "=\"#%/<>?@\\^`{|}:&",
"imageUrl": "",
"connections": [
{
"type": "walletConnectV2",
"native": "trust:",
"universal": "https://link.trustwallet.com"
} }
], },
"methods": [ "config":{
"eth_sendTransaction", "comment":"Trust Wallet",
"personal_sign", "iosMinVersion":"0",
"eth_signTypedData" "encoding":"=\"#%/<>?@\\^`{|}:&",
] "imageUrl":"https://v4.testnet.dydx.exchange/wallets/trust-wallet.png",
}, "image":"trust-wallet.png",
"userFields": { "connections":[
"analyticEvent": "TRUST_WALLET", {
"imageName": "trust-wallet.png" "type":"walletConnectV2",
} "native":"trust:",
"universal":"https://link.trustwallet.com"
}
]
},
"userFields":{
"analyticEvent":"TRUST_WALLET"
}
}, },
{ {
"id": "Zerion", "id":"Zerion",
"name": "Zerion", "name":"Zerion",
"description": "", "description":"",
"homepage": "https://zerion.io/", "homepage":"https://zerion.io/",
"chains": [ "chains":[
"eip155:1" "eip155:1"
], ],
"versions": [ "versions":[
"1" "1"
], ],
"app": { "app":{
"browser": "", "browser":"",
"ios": "https://apps.apple.com/app/apple-store/id1456732565", "ios":"https://apps.apple.com/app/apple-store/id1456732565",
"android": "https://play.google.com/store/apps/details?id=io.zerion.android", "android":"https://play.google.com/store/apps/details?id=io.zerion.android",
"mac": "", "mac":"",
"windows": "", "windows":"",
"linux": "" "linux":""
}, },
"mobile": { "mobile":{
"native": "zerion:", "native":"zerion:",
"universal": "" "universal":""
}, },
"desktop": { "desktop":{
"native": "", "native":"",
"universal": "" "universal":""
}, },
"metadata": { "metadata":{
"shortName": "Zerion", "shortName":"Zerion",
"colors": { "colors":{
"primary": "rgb(51, 117, 187)", "primary":"rgb(51, 117, 187)",
"secondary": "" "secondary":""
}
},
"config": {
"comment": "Zerion Wallet",
"iosMinVersion": "0",
"encoding": "=\"#%/<>?@\\^`{|}:&",
"imageUrl": "",
"connections": [
{
"type": "walletConnectV2",
"native": "zerion:",
"universal": ""
} }
], },
"methods": [ "config":{
"eth_sendTransaction", "comment":"Zerion Wallet",
"personal_sign", "iosMinVersion":"0",
"eth_signTypedData" "encoding":"=\"#%/<>?@\\^`{|}:&",
] "imageUrl":"https://v4.testnet.dydx.exchange/wallets/zerion.png",
}, "image":"zerion.png",
"userFields": { "connections":[
"analyticEvent": "ZERION", {
"imageName": "zerion.png" "type":"walletConnectV2",
} "native":"zerion:",
"universal":""
}
]
},
"userFields":{
"analyticEvent":"ZERION"
}
}, },
{ {
"id": "20459438007b75f4f4acb98bf29aa3b800550309646d375da5fd4aac6c2a2c66", "id":"20459438007b75f4f4acb98bf29aa3b800550309646d375da5fd4aac6c2a2c66",
"name": "TokenPocket", "name":"TokenPocket",
"description": "", "description":"",
"homepage": "https://tokenpocket.pro/", "homepage":"https://tokenpocket.pro/",
"chains": [ "chains":[
"eip155:1" "eip155:1"
], ],
"versions": [ "versions":[
"1" "1"
], ],
"app": { "app":{
"browser": "", "browser":"",
"ios": "https://apps.apple.com/us/app/tokenpocket-trusted-wallet/id1436028697", "ios":"https://apps.apple.com/us/app/tokenpocket-trusted-wallet/id1436028697",
"android": "https://play.google.com/store/apps/details?id=vip.mytokenpocket", "android":"https://play.google.com/store/apps/details?id=vip.mytokenpocket",
"mac": "", "mac":"",
"windows": "", "windows":"",
"linux": "" "linux":""
}, },
"mobile": { "mobile":{
"native": "tpoutside:", "native":"tpoutside:",
"universal": "" "universal":""
}, },
"desktop": { "desktop":{
"native": "", "native":"",
"universal": "" "universal":""
}, },
"metadata": { "metadata":{
"shortName": "TokenPocket", "shortName":"TokenPocket",
"colors": { "colors":{
"primary": "rgb(41, 128, 254)", "primary":"rgb(41, 128, 254)",
"secondary": "" "secondary":""
}
},
"config": {
"comment": "TokenPocket",
"iosMinVersion": "0",
"imageUrl": "",
"connections": [
{
"type": "walletConnectV2",
"native": "tpoutside:",
"universal": ""
} }
], },
"methods": [ "config":{
"eth_sendTransaction", "comment":"TokenPocket",
"personal_sign", "iosMinVersion":"0",
"eth_signTypedData" "imageUrl":"https://v4.testnet.dydx.exchange/wallets/tokenpocket.png",
] "image":"tokenpocket.png",
}, "connections":[
"userFields": { {
"analyticEvent": "TOKEN_POCKET", "type":"walletConnect",
"imageName": "tokenpocket.png" "native":"tpoutside:",
} "universal":""
}
]
},
"userFields":{
"analyticEvent":"TOKEN_POCKET"
}
}, },
{ {
"id": "1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369", "id":"1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369",
"name": "Rainbow", "name":"Rainbow",
"description": "", "description":"",
"homepage": "https://rainbow.me/", "homepage":"https://rainbow.me/",
"chains": [ "chains":[
"eip155:1" "eip155:1"
], ],
"versions": [ "versions":[
"1" "1"
], ],
"app": { "app":{
"browser": "", "browser":"",
"ios": "https://apps.apple.com/us/app/rainbow-ethereum-wallet/id1457119021", "ios":"https://apps.apple.com/us/app/rainbow-ethereum-wallet/id1457119021",
"android": "", "android":"",
"mac": "", "mac":"",
"windows": "", "windows":"",
"linux": "" "linux":""
}, },
"mobile": { "mobile":{
"native": "rainbow:", "native":"rainbow:",
"universal": "https://rnbwapp.com" "universal":"https://rnbwapp.com"
}, },
"desktop": { "desktop":{
"native": "", "native":"",
"universal": "" "universal":""
}, },
"metadata": { "metadata":{
"shortName": "Rainbow", "shortName":"Rainbow",
"colors": { "colors":{
"primary": "rgb(0, 30, 89)", "primary":"rgb(0, 30, 89)",
"secondary": "" "secondary":""
}
},
"config": {
"comment": "Rainbow",
"iosMinVersion": "0",
"encoding": "=\"#%/<>?@\\^`{|}:&",
"backlinked": true,
"imageUrl": "",
"connections": [
{
"type": "walletConnectV2",
"native": "rainbow:",
"universal": "https://rnbwapp.com"
} }
], },
"methods": [ "config":{
"eth_sendTransaction", "comment":"Rainbow",
"personal_sign", "iosMinVersion":"0",
"eth_signTypedData" "encoding":"=\"#%/<>?@\\^`{|}:&",
] "backlinked":true,
}, "imageUrl":"https://v4.testnet.dydx.exchange/wallets/rainbow-wallet.png",
"userFields": { "image":"rainbow-wallet.png",
"analyticEvent": "RAINBOW_WALLET", "connections":[
"imageName": "rainbow-wallet.png" {
} "type":"walletConnectV2",
"native":"rainbow:",
"universal":"https://rnbwapp.com"
}
]
},
"userFields":{
"analyticEvent":"RAINBOW_WALLET"
}
}, },
{ {
"id": "09102e7bbbd3f92001eda104abe23803181629f695e8f1b95af96d88ff7d5890", "id":"09102e7bbbd3f92001eda104abe23803181629f695e8f1b95af96d88ff7d5890",
"name": "1inch Wallet", "name":"1inch Wallet",
"description": "", "description":"",
"homepage": "https://1inch.io/wallet/", "homepage":"https://1inch.io/wallet/",
"chains": [ "chains":[
"eip155:1", "eip155:1",
"eip155:56" "eip155:56"
], ],
"versions": [ "versions":[
"1" "1"
], ],
"app": { "app":{
"browser": "", "browser":"",
"ios": "https://apps.apple.com/us/app/1inch-defi-wallet/id1546049391", "ios":"https://apps.apple.com/us/app/1inch-defi-wallet/id1546049391",
"android": "", "android":"",
"mac": "", "mac":"",
"windows": "", "windows":"",
"linux": "" "linux":""
}, },
"mobile": { "mobile":{
"native": "oneinch:", "native":"oneinch:",
"universal": "https://wallet.1inch.io" "universal":"https://wallet.1inch.io"
}, },
"desktop": { "desktop":{
"native": "", "native":"",
"universal": "" "universal":""
}, },
"metadata": { "metadata":{
"shortName": "1inch", "shortName":"1inch",
"colors": { "colors":{
"primary": "rgb(31, 36, 46)", "primary":"rgb(31, 36, 46)",
"secondary": "" "secondary":""
}
},
"config": {
"comment": "1inch",
"iosMinVersion": "0",
"encoding": "=\"#%/<>?@\\^`{|}:&",
"imageUrl": "",
"connections": [
{
"type": "walletConnectV2",
"native": "oneinch:",
"universal": "https://wallet.1inch.io"
} }
], },
"methods": [ "config":{
"eth_sendTransaction", "comment":"1inch",
"personal_sign", "iosMinVersion":"0",
"eth_signTypedData" "encoding":"=\"#%/<>?@\\^`{|}:&",
] "imageUrl":"https://v4.testnet.dydx.exchange/wallets/1inch.png",
}, "image":"1inch.png",
"userFields": { "connections":[
"analyticEvent": "1INCH", {
"imageName": "1inch.png" "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.

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

+5 -6
View File
@@ -110,18 +110,18 @@ export const notificationTypes = [
const stringGetter = useStringGetter(); const stringGetter = useStringGetter();
const { transferNotifications } = useLocalNotifications(); 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_IN_PROGRESS;
if (type === 'deposit' && finished) return STRING_KEYS.DEPOSIT; 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; return STRING_KEYS.WITHDRAW;
}, []); }, []);
useEffect(() => { useEffect(() => {
for (const transfer of transferNotifications) { 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 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 // @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 error = status?.errors?.length ? status?.errors[0] : status?.error;
@@ -154,7 +154,6 @@ export const notificationTypes = [
description: description, description: description,
customContent: ( customContent: (
<TransferStatusToast <TransferStatusToast
type={type}
toAmount={transfer.toAmount} toAmount={transfer.toAmount}
triggeredAt={transfer.triggeredAt} triggeredAt={transfer.triggeredAt}
status={transfer.status} status={transfer.status}
@@ -163,7 +162,7 @@ export const notificationTypes = [
customMenuContent: !finished && ( customMenuContent: !finished && (
<div> <div>
{description} {description}
<TransferStatusSteps status={transfer.status} type={type} /> <TransferStatusSteps status={transfer.status} />
</div> </div>
), ),
toastSensitivity: 'foreground', toastSensitivity: 'foreground',
+3 -2
View File
@@ -92,10 +92,11 @@ 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: import.meta.env.VITE_BASE_URL, url: 'https://trade.dydx.exchange',
icons: [`${import.meta.env.VITE_BASE_URL}/cbw-image.png}`], icons: ['https://trade.dydx.exchange/cbw-image.png'],
}, },
showQrModal: true, showQrModal: true,
qrModalOptions: { qrModalOptions: {
+7 -3
View File
@@ -1,5 +1,6 @@
import { useCallback, useState, useMemo } from 'react'; import { useCallback, useState, useMemo } from 'react';
import styled, { type AnyStyledComponent } from 'styled-components'; 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 { Root, Trigger, Content } from '@radix-ui/react-collapsible';
import { StatusResponse } from '@0xsquid/sdk'; import { StatusResponse } from '@0xsquid/sdk';
@@ -20,14 +21,12 @@ import { LoadingDots } from '@/components/Loading/LoadingDots';
import { layoutMixins } from '@/styles/layoutMixins'; import { layoutMixins } from '@/styles/layoutMixins';
type ElementProps = { type ElementProps = {
type: 'withdrawal' | 'deposit';
toAmount?: number; toAmount?: number;
triggeredAt?: number; triggeredAt?: number;
status?: StatusResponse; status?: StatusResponse;
}; };
export const TransferStatusToast = ({ export const TransferStatusToast = ({
type,
toAmount, toAmount,
triggeredAt = Date.now(), triggeredAt = Date.now(),
status, status,
@@ -39,6 +38,11 @@ export const TransferStatusToast = ({
// @ts-ignore status.errors is not in the type definition but can be returned // @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 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 updateSecondsLeft = useCallback(() => {
const fromChainEta = (status?.fromChain?.chainData?.estimatedRouteDuration || 0) * 1000; const fromChainEta = (status?.fromChain?.chainData?.estimatedRouteDuration || 0) * 1000;
const toChainEta = (status?.toChain?.chainData?.estimatedRouteDuration || 0) * 1000; const toChainEta = (status?.toChain?.chainData?.estimatedRouteDuration || 0) * 1000;
@@ -65,7 +69,7 @@ export const TransferStatusToast = ({
side="bottom" side="bottom"
slotReceipt={ slotReceipt={
<Styled.Receipt> <Styled.Receipt>
<TransferStatusSteps status={status} type={type} /> <TransferStatusSteps status={status} />
</Styled.Receipt> </Styled.Receipt>
} }
> >
+4 -7
View File
@@ -1,6 +1,7 @@
import { useMemo } from 'react'; import { useMemo } from 'react';
import styled, { css, keyframes, type AnyStyledComponent } from 'styled-components'; import styled, { css, keyframes, type AnyStyledComponent } from 'styled-components';
import { StatusResponse } from '@0xsquid/sdk'; import { StatusResponse } from '@0xsquid/sdk';
import { TESTNET_CHAIN_ID } from '@dydxprotocol/v4-client-js';
import { useStringGetter } from '@/hooks'; import { useStringGetter } from '@/hooks';
@@ -14,7 +15,6 @@ import { STRING_KEYS } from '@/constants/localization';
type ElementProps = { type ElementProps = {
status?: StatusResponse; status?: StatusResponse;
type: 'withdrawal' | 'deposit';
}; };
enum TransferStatusStep { enum TransferStatusStep {
@@ -24,13 +24,14 @@ enum TransferStatusStep {
Complete, Complete,
} }
export const TransferStatusSteps = ({ status, type }: ElementProps) => { export const TransferStatusSteps = ({ status }: ElementProps) => {
const stringGetter = useStringGetter(); const stringGetter = useStringGetter();
const { currentStep, steps } = useMemo(() => { const { currentStep, steps, type } = useMemo(() => {
const routeStatus = status?.routeStatus; const routeStatus = status?.routeStatus;
const fromChain = status?.fromChain?.chainData?.chainId; const fromChain = status?.fromChain?.chainData?.chainId;
const toChain = status?.toChain?.chainData?.chainId; const toChain = status?.toChain?.chainData?.chainId;
const type = toChain === TESTNET_CHAIN_ID ? 'deposit' : 'withdrawal';
const steps = [ const steps = [
{ {
@@ -73,10 +74,6 @@ export const TransferStatusSteps = ({ status, type }: ElementProps) => {
currentStep = TransferStatusStep.FromChain; currentStep = TransferStatusStep.FromChain;
} }
if (status?.squidTransactionStatus === 'success') {
currentStep = TransferStatusStep.Complete;
}
return { return {
currentStep, currentStep,
steps, steps,
+2 -2
View File
@@ -27,9 +27,9 @@ export const DisconnectDialog = ({ setIsOpen }: ElementProps) => {
}; };
return ( return (
<Dialog isOpen setIsOpen={setIsOpen} title={stringGetter({ key: STRING_KEYS.DISCONNECT })}> <Dialog isOpen setIsOpen={setIsOpen} title="Disconnect">
<Styled.Content> <Styled.Content>
<p>{stringGetter({ key: STRING_KEYS.DISCONNECT_CONFIRMATION })}</p> <p>Are you sure you want to disconnect your account?</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.dydx.academy/video/defi-wallet`; const aboutWalletsLink = `https://www.dydxacademy.info/educational-video-series/onboarding-to-defi-with-dydx`;
export const ChooseWallet = () => { export const ChooseWallet = () => {
const stringGetter = useStringGetter(); const stringGetter = useStringGetter();
@@ -34,14 +34,7 @@ export const ChooseWallet = () => {
<Styled.AlertMessage type={AlertType.Error}> <Styled.AlertMessage type={AlertType.Error}>
{ {
<h4> <h4>
{stringGetter({ Couldn't connect to {stringGetter({ key: wallets[selectedWalletType].stringKey })}.
key: STRING_KEYS.COULD_NOT_CONNECT,
params: {
WALLET: stringGetter({
key: wallets[selectedWalletType].stringKey,
}),
},
})}
</h4> </h4>
} }
{selectedWalletError} {selectedWalletError}