Compare commits

..
Author SHA1 Message Date
Rui a716d5f78d Merge branch 'main' into feature/wallets 2023-10-11 14:02:43 -07:00
Rui 1d697da986 Updated wallets.json and add chain name and logo to env.json 2023-10-11 14:02:06 -07:00
12 changed files with 585 additions and 471 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_PK_ENCRYPTION_KEY=
VITE_WALLETCONNECT1_BRIDGE=
VITE_WALLETCONNECT2_PROJECT_ID= VITE_WALLETCONNECT2_PROJECT_ID=
VITE_V3_TOKEN_ADDRESS= VITE_V3_TOKEN_ADDRESS=
-1
View File
@@ -13,7 +13,6 @@ dist
dist-ssr dist-ssr
*.local *.local
*.key *.key
.env
# Editor directories and files # Editor directories and files
.vscode/* .vscode/*
Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 KiB

After

Width:  |  Height:  |  Size: 122 KiB

+26
View File
@@ -35,6 +35,8 @@
"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": {
@@ -94,6 +96,8 @@
"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": {
@@ -152,6 +156,8 @@
"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": {
@@ -210,6 +216,8 @@
"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": {
@@ -268,6 +276,8 @@
"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": {
@@ -330,6 +340,8 @@
"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": {
@@ -392,6 +404,8 @@
"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": {
@@ -456,6 +470,8 @@
"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": {
@@ -519,6 +535,8 @@
"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": {
@@ -582,6 +600,8 @@
"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": {
@@ -645,6 +665,8 @@
"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": {
@@ -708,6 +730,8 @@
"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": {
@@ -771,6 +795,8 @@
"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",
+439 -449
View File
@@ -1,474 +1,464 @@
[ [
{ {
"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"
} }
}, ],
"config":{ "methods": [
"comment":"MetaMask", "eth_sendTransaction",
"iosMinVersion":"0", "personal_sign",
"imageUrl":"https://v4.testnet.dydx.exchange/wallets/metamask.png", "eth_signTypedData",
"image":"metamask.png", "wallet_addEthereumChain"
"encoding":"=\"#%/<>?@\\^`{|}:&", ]
"connections":[ },
{ "userFields": {
"type":"walletConnectV2", "analyticEvent": "METAMASK",
"native":"metamask:", "imageName": "metamask.png"
"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": ""
} }
}, ],
"config":{ "methods": [
"comment":"Coinbase", "eth_sendTransaction",
"iosMinVersion":"1.8.0", "personal_sign",
"imageUrl":"https://v4.testnet.dydx.exchange/wallets/coinbase-wallet.png", "eth_signTypedData",
"image":"coinbase-wallet.png", "wallet_addEthereumChain"
"encoding":"=\"#%/<>?@\\^`{|}:&", ]
"connections":[ },
{ "userFields": {
"type":"walletSegue", "analyticEvent": "COINBASE_WALLET",
"native":"cbwallet:", "imageName": "coinbase-wallet.png"
"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": ""
} }
}, ],
"config":{ "methods": [
"comment":"imToken", "eth_sendTransaction",
"iosMinVersion":"0", "personal_sign",
"imageUrl":"https://v4.testnet.dydx.exchange/wallets/imtoken.png", "eth_signTypedData"
"image":"imtoken.png", ]
"connections":[ },
{ "userFields": {
"type":"walletConnect", "analyticEvent": "IMTOKEN",
"native":"imtokenv2:", "imageName": "imtoken.png"
"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"
} }
}, ],
"config":{ "methods": [
"comment":"Trust Wallet", "eth_sendTransaction",
"iosMinVersion":"0", "personal_sign",
"encoding":"=\"#%/<>?@\\^`{|}:&", "eth_signTypedData"
"imageUrl":"https://v4.testnet.dydx.exchange/wallets/trust-wallet.png", ]
"image":"trust-wallet.png", },
"connections":[ "userFields": {
{ "analyticEvent": "TRUST_WALLET",
"type":"walletConnectV2", "imageName": "trust-wallet.png"
"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": ""
} }
}, ],
"config":{ "methods": [
"comment":"Zerion Wallet", "eth_sendTransaction",
"iosMinVersion":"0", "personal_sign",
"encoding":"=\"#%/<>?@\\^`{|}:&", "eth_signTypedData"
"imageUrl":"https://v4.testnet.dydx.exchange/wallets/zerion.png", ]
"image":"zerion.png", },
"connections":[ "userFields": {
{ "analyticEvent": "ZERION",
"type":"walletConnectV2", "imageName": "zerion.png"
"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": ""
} }
}, ],
"config":{ "methods": [
"comment":"TokenPocket", "eth_sendTransaction",
"iosMinVersion":"0", "personal_sign",
"imageUrl":"https://v4.testnet.dydx.exchange/wallets/tokenpocket.png", "eth_signTypedData"
"image":"tokenpocket.png", ]
"connections":[ },
{ "userFields": {
"type":"walletConnect", "analyticEvent": "TOKEN_POCKET",
"native":"tpoutside:", "imageName": "tokenpocket.png"
"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"
} }
}, ],
"config":{ "methods": [
"comment":"Rainbow", "eth_sendTransaction",
"iosMinVersion":"0", "personal_sign",
"encoding":"=\"#%/<>?@\\^`{|}:&", "eth_signTypedData"
"backlinked":true, ]
"imageUrl":"https://v4.testnet.dydx.exchange/wallets/rainbow-wallet.png", },
"image":"rainbow-wallet.png", "userFields": {
"connections":[ "analyticEvent": "RAINBOW_WALLET",
{ "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"
} }
}, ],
"config":{ "methods": [
"comment":"1inch", "eth_sendTransaction",
"iosMinVersion":"0", "personal_sign",
"encoding":"=\"#%/<>?@\\^`{|}:&", "eth_signTypedData"
"imageUrl":"https://v4.testnet.dydx.exchange/wallets/1inch.png", ]
"image":"1inch.png", },
"connections":[ "userFields": {
{ "analyticEvent": "1INCH",
"type":"walletConnect", "imageName": "1inch.png"
"native":"oneinch:", }
"universal":"https://wallet.1inch.io"
}
]
},
"userFields":{
"analyticEvent":"1INCH"
}
},
{
"id":"bae74827272509a6d63ea25514d9c68ad235c14e45e183518c7ded4572a1b0c4",
"name":"Huobi Wallet",
"description":"",
"homepage":"https://huobiwallet.com/",
"chains":[
"eip155:1"
],
"versions":[
"1"
],
"app":{
"browser":"",
"ios":"https://apps.apple.com/us/app/id1433883012",
"android":"https://play.google.com/store/apps/details?id=com.huobionchainwallet.gp",
"mac":"",
"windows":"",
"linux":""
},
"mobile":{
"native":"huobiwallet:",
"universal":""
},
"desktop":{
"native":"",
"universal":""
},
"metadata":{
"shortName":"Huobi",
"colors":{
"primary":"rgb(45,101,248)",
"secondary":""
}
},
"config":{
"comment":"Huobi",
"iosMinVersion":"0",
"encoding":"=\"#%/<>?@\\^`{|}:&",
"imageUrl":"https://v4.testnet.dydx.exchange/wallets/huobi-wallet.png",
"image":"huobi-wallet.png",
"connections":[
{
"type":"walletConnect",
"native":"huobiwallet:",
"universal":""
}
]
},
"userFields":{
"analyticEvent":"HUOBI_WALLET"
}
} }
] ]
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

+69 -12
View File
@@ -32,6 +32,7 @@ export enum WalletConnectionType {
CoinbaseWalletSdk = 'coinbaseWalletSdk', CoinbaseWalletSdk = 'coinbaseWalletSdk',
CosmosSigner = 'CosmosSigner', CosmosSigner = 'CosmosSigner',
InjectedEip1193 = 'injectedEip1193', InjectedEip1193 = 'injectedEip1193',
WalletConnect1 = 'walletConnect1',
WalletConnect2 = 'walletConnect2', WalletConnect2 = 'walletConnect2',
} }
@@ -61,6 +62,10 @@ export const walletConnectionTypes: Record<WalletConnectionType, WalletConnectio
name: 'injected EIP-1193 provider', name: 'injected EIP-1193 provider',
wagmiConnectorId: 'injected', wagmiConnectorId: 'injected',
}, },
[WalletConnectionType.WalletConnect1]: {
name: 'WalletConnect 1.0',
wagmiConnectorId: 'walletConnectLegacy',
},
[WalletConnectionType.WalletConnect2]: { [WalletConnectionType.WalletConnect2]: {
name: 'WalletConnect 2.0', name: 'WalletConnect 2.0',
wagmiConnectorId: 'walletConnect', wagmiConnectorId: 'walletConnect',
@@ -87,6 +92,7 @@ export enum WalletType {
Rainbow = 'RAINBOW_WALLET', Rainbow = 'RAINBOW_WALLET',
TokenPocket = 'TOKEN_POCKET', TokenPocket = 'TOKEN_POCKET',
TrustWallet = 'TRUST_WALLET', TrustWallet = 'TRUST_WALLET',
WalletConnect = 'WALLETCONNECT',
WalletConnect2 = 'WALLETCONNECT_2', WalletConnect2 = 'WALLETCONNECT_2',
// TestWallet = 'TEST_WALLET', // TestWallet = 'TEST_WALLET',
OtherWallet = 'OTHER_WALLET', OtherWallet = 'OTHER_WALLET',
@@ -98,6 +104,7 @@ type WalletConfig = {
icon: string; icon: string;
connectionTypes: WalletConnectionType[]; connectionTypes: WalletConnectionType[];
matchesInjectedEip1193?: (provider: ExternalProvider & any) => boolean; matchesInjectedEip1193?: (provider: ExternalProvider & any) => boolean;
walletconnect1Name?: string;
walletconnect2Id?: string; walletconnect2Id?: string;
}; };
@@ -110,6 +117,7 @@ export const wallets: Record<WalletType, WalletConfig> = {
WalletConnectionType.InjectedEip1193, WalletConnectionType.InjectedEip1193,
// WalletConnectionType.CoinbaseWalletSdk, // WalletConnectionType.CoinbaseWalletSdk,
WalletConnectionType.WalletConnect2, WalletConnectionType.WalletConnect2,
WalletConnectionType.WalletConnect1,
], ],
matchesInjectedEip1193: (provider) => matchesInjectedEip1193: (provider) =>
Object.entries(wallets).every( Object.entries(wallets).every(
@@ -123,23 +131,30 @@ export const wallets: Record<WalletType, WalletConfig> = {
type: WalletType.BitKeep, type: WalletType.BitKeep,
stringKey: STRING_KEYS.BITKEEP, stringKey: STRING_KEYS.BITKEEP,
icon: BitkeepIcon, icon: BitkeepIcon,
connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect2], connectionTypes: [
WalletConnectionType.InjectedEip1193,
WalletConnectionType.WalletConnect2,
WalletConnectionType.WalletConnect1,
],
matchesInjectedEip1193: (provider) => provider.isBitKeep, // isBitKeepChrome, isBitEthereum matchesInjectedEip1193: (provider) => provider.isBitKeep, // isBitKeepChrome, isBitEthereum
walletconnect1Name: 'bitkeep',
walletconnect2Id: '38f5d18bd8522c244bdd70cb4a68e0e718865155811c043f052fb9f1c51de662', walletconnect2Id: '38f5d18bd8522c244bdd70cb4a68e0e718865155811c043f052fb9f1c51de662',
}, },
[WalletType.BitPie]: { [WalletType.BitPie]: {
type: WalletType.BitPie, type: WalletType.BitPie,
stringKey: STRING_KEYS.BITPIE, stringKey: STRING_KEYS.BITPIE,
icon: BitpieIcon, icon: BitpieIcon,
connectionTypes: [WalletConnectionType.InjectedEip1193], connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect1],
matchesInjectedEip1193: (provider) => provider.isBitpie, matchesInjectedEip1193: (provider) => provider.isBitpie,
walletconnect1Name: 'bitpie',
}, },
[WalletType.CloverWallet]: { [WalletType.CloverWallet]: {
type: WalletType.CloverWallet, type: WalletType.CloverWallet,
stringKey: STRING_KEYS.CLOVER_WALLET, stringKey: STRING_KEYS.CLOVER_WALLET,
icon: CloverWalletIcon, icon: CloverWalletIcon,
connectionTypes: [WalletConnectionType.InjectedEip1193], connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect1],
matchesInjectedEip1193: (provider) => provider.isClover, matchesInjectedEip1193: (provider) => provider.isClover,
// walletconnect1Name: 'clover',
}, },
[WalletType.CoinbaseWallet]: { [WalletType.CoinbaseWallet]: {
type: WalletType.CoinbaseWallet, type: WalletType.CoinbaseWallet,
@@ -148,23 +163,33 @@ export const wallets: Record<WalletType, WalletConfig> = {
connectionTypes: [ connectionTypes: [
WalletConnectionType.CoinbaseWalletSdk, WalletConnectionType.CoinbaseWalletSdk,
WalletConnectionType.InjectedEip1193, WalletConnectionType.InjectedEip1193,
WalletConnectionType.WalletConnect2, WalletConnectionType.WalletConnect1,
], ],
matchesInjectedEip1193: (provider) => provider.isCoinbaseWallet, // provider.selectedProvider?.isCoinbaseWallet, matchesInjectedEip1193: (provider) => provider.isCoinbaseWallet, // provider.selectedProvider?.isCoinbaseWallet,
walletconnect1Name: 'coinbase',
}, },
[WalletType.Coin98]: { [WalletType.Coin98]: {
type: WalletType.Coin98, type: WalletType.Coin98,
stringKey: STRING_KEYS.COIN98, stringKey: STRING_KEYS.COIN98,
icon: Coin98Icon, icon: Coin98Icon,
connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect2], connectionTypes: [
WalletConnectionType.InjectedEip1193,
WalletConnectionType.WalletConnect2,
WalletConnectionType.WalletConnect1,
],
matchesInjectedEip1193: (provider) => provider.isCoin98, matchesInjectedEip1193: (provider) => provider.isCoin98,
walletconnect1Name: 'coin98',
walletconnect2Id: '2a3c89040ac3b723a1972a33a125b1db11e258a6975d3a61252cd64e6ea5ea01', walletconnect2Id: '2a3c89040ac3b723a1972a33a125b1db11e258a6975d3a61252cd64e6ea5ea01',
}, },
[WalletType.HuobiWallet]: { [WalletType.HuobiWallet]: {
type: WalletType.HuobiWallet, type: WalletType.HuobiWallet,
stringKey: STRING_KEYS.HUOBI_WALLET, stringKey: STRING_KEYS.HUOBI_WALLET,
icon: HuobiIcon, icon: HuobiIcon,
connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect2], connectionTypes: [
WalletConnectionType.InjectedEip1193,
WalletConnectionType.WalletConnect2,
WalletConnectionType.WalletConnect1,
],
matchesInjectedEip1193: (provider) => provider.isHbWallet, matchesInjectedEip1193: (provider) => provider.isHbWallet,
walletconnect2Id: '797c615e2c556b610c048eb35535f212c0dd58de5d03e763120e90a7d1350a77', walletconnect2Id: '797c615e2c556b610c048eb35535f212c0dd58de5d03e763120e90a7d1350a77',
}, },
@@ -172,48 +197,74 @@ export const wallets: Record<WalletType, WalletConfig> = {
type: WalletType.ImToken, type: WalletType.ImToken,
stringKey: STRING_KEYS.IMTOKEN, stringKey: STRING_KEYS.IMTOKEN,
icon: ImTokenIcon, icon: ImTokenIcon,
connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect2], connectionTypes: [
WalletConnectionType.InjectedEip1193,
WalletConnectionType.WalletConnect2,
WalletConnectionType.WalletConnect1,
],
matchesInjectedEip1193: (provider) => provider.isImToken, matchesInjectedEip1193: (provider) => provider.isImToken,
walletconnect1Name: 'imtoken',
walletconnect2Id: 'ef333840daf915aafdc4a004525502d6d49d77bd9c65e0642dbaefb3c2893bef', walletconnect2Id: 'ef333840daf915aafdc4a004525502d6d49d77bd9c65e0642dbaefb3c2893bef',
}, },
[WalletType.MathWallet]: { [WalletType.MathWallet]: {
type: WalletType.MathWallet, type: WalletType.MathWallet,
stringKey: STRING_KEYS.MATH_WALLET, stringKey: STRING_KEYS.MATH_WALLET,
icon: MathWalletIcon, icon: MathWalletIcon,
connectionTypes: [WalletConnectionType.InjectedEip1193], connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect1],
matchesInjectedEip1193: (provider) => provider.isMathWallet, matchesInjectedEip1193: (provider) => provider.isMathWallet,
walletconnect1Name: 'math',
walletconnect2Id: '7674bb4e353bf52886768a3ddc2a4562ce2f4191c80831291218ebd90f5f5e26', walletconnect2Id: '7674bb4e353bf52886768a3ddc2a4562ce2f4191c80831291218ebd90f5f5e26',
}, },
[WalletType.MetaMask]: { [WalletType.MetaMask]: {
type: WalletType.MetaMask, type: WalletType.MetaMask,
stringKey: STRING_KEYS.METAMASK, stringKey: STRING_KEYS.METAMASK,
icon: MetaMaskIcon, icon: MetaMaskIcon,
connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect2], connectionTypes: [
WalletConnectionType.InjectedEip1193,
WalletConnectionType.WalletConnect2,
WalletConnectionType.WalletConnect1,
],
matchesInjectedEip1193: isMetaMask, matchesInjectedEip1193: isMetaMask,
walletconnect1Name: 'metamask',
walletconnect2Id: 'c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96', walletconnect2Id: 'c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96',
}, },
[WalletType.Rainbow]: { [WalletType.Rainbow]: {
type: WalletType.Rainbow, type: WalletType.Rainbow,
stringKey: STRING_KEYS.RAINBOW_WALLET, stringKey: STRING_KEYS.RAINBOW_WALLET,
icon: RainbowIcon, icon: RainbowIcon,
connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect2], connectionTypes: [
WalletConnectionType.InjectedEip1193,
WalletConnectionType.WalletConnect2,
WalletConnectionType.WalletConnect1,
],
matchesInjectedEip1193: (provider) => provider.isRainbowWallet, matchesInjectedEip1193: (provider) => provider.isRainbowWallet,
walletconnect1Name: 'rainbow',
walletconnect2Id: '1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369', walletconnect2Id: '1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369',
}, },
[WalletType.TokenPocket]: { [WalletType.TokenPocket]: {
type: WalletType.TokenPocket, type: WalletType.TokenPocket,
stringKey: STRING_KEYS.TOKEN_POCKET, stringKey: STRING_KEYS.TOKEN_POCKET,
icon: TokenPocketIcon, icon: TokenPocketIcon,
connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect2], connectionTypes: [
WalletConnectionType.InjectedEip1193,
WalletConnectionType.WalletConnect2,
WalletConnectionType.WalletConnect1,
],
matchesInjectedEip1193: (provider) => provider.isTokenPocket, matchesInjectedEip1193: (provider) => provider.isTokenPocket,
walletconnect1Name: 'tokenpocket',
walletconnect2Id: '20459438007b75f4f4acb98bf29aa3b800550309646d375da5fd4aac6c2a2c66', walletconnect2Id: '20459438007b75f4f4acb98bf29aa3b800550309646d375da5fd4aac6c2a2c66',
}, },
[WalletType.TrustWallet]: { [WalletType.TrustWallet]: {
type: WalletType.TrustWallet, type: WalletType.TrustWallet,
stringKey: STRING_KEYS.TRUST_WALLET, stringKey: STRING_KEYS.TRUST_WALLET,
icon: TrustWalletIcon, icon: TrustWalletIcon,
connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect2], connectionTypes: [
WalletConnectionType.InjectedEip1193,
WalletConnectionType.WalletConnect2,
WalletConnectionType.WalletConnect1,
],
matchesInjectedEip1193: (provider) => provider.isTrust, matchesInjectedEip1193: (provider) => provider.isTrust,
walletconnect1Name: 'trust',
walletconnect2Id: '4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0', walletconnect2Id: '4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0',
}, },
[WalletType.WalletConnect2]: { [WalletType.WalletConnect2]: {
@@ -222,6 +273,12 @@ export const wallets: Record<WalletType, WalletConfig> = {
icon: WalletConnectIcon, icon: WalletConnectIcon,
connectionTypes: [WalletConnectionType.WalletConnect2], connectionTypes: [WalletConnectionType.WalletConnect2],
}, },
[WalletType.WalletConnect]: {
type: WalletType.WalletConnect,
stringKey: STRING_KEYS.WALLET_CONNECT,
icon: WalletConnectIcon,
connectionTypes: [WalletConnectionType.WalletConnect1],
},
[WalletType.Keplr]: { [WalletType.Keplr]: {
type: WalletType.Keplr, type: WalletType.Keplr,
stringKey: STRING_KEYS.KEPLR, stringKey: STRING_KEYS.KEPLR,
+13 -9
View File
@@ -2,23 +2,27 @@ import { WalletType } from '@/constants/wallets';
import { isTruthy } from '@/lib/isTruthy'; import { isTruthy } from '@/lib/isTruthy';
import { useSelectedNetwork } from './useSelectedNetwork';
export const useDisplayedWallets = () => { export const useDisplayedWallets = () => {
const { selectedNetwork } = useSelectedNetwork();
return [ return [
WalletType.MetaMask, WalletType.MetaMask,
import.meta.env.MODE !== 'production' && WalletType.Keplr, import.meta.env.MODE !== 'production' && WalletType.Keplr,
WalletType.WalletConnect2, WalletType.WalletConnect2,
WalletType.WalletConnect,
WalletType.CoinbaseWallet, WalletType.CoinbaseWallet,
// Hide these wallet options until they can be properly tested on mainnet WalletType.ImToken,
// WalletType.ImToken, WalletType.Rainbow,
// WalletType.Rainbow, WalletType.TrustWallet,
// WalletType.TrustWallet, WalletType.HuobiWallet,
// WalletType.HuobiWallet, WalletType.BitKeep,
// WalletType.BitKeep, WalletType.Coin98,
// WalletType.Coin98,
WalletType.OtherWallet, WalletType.OtherWallet,
].filter(isTruthy); ].filter(isTruthy);
+25
View File
@@ -87,6 +87,14 @@ const injectedConnectorOptions = {
}, },
}; };
const walletconnect1ConnectorOptions = {
chains,
options: {
bridge: import.meta.env.VITE_WALLETCONNECT1_BRIDGE,
qrcode: true,
},
};
const walletconnect2ConnectorOptions: ConstructorParameters<typeof WalletConnectConnector>[0] = { const walletconnect2ConnectorOptions: ConstructorParameters<typeof WalletConnectConnector>[0] = {
chains, chains,
options: { options: {
@@ -135,6 +143,7 @@ const connectors = [
reloadOnDisconnect: false, reloadOnDisconnect: false,
}, },
}), }),
new WalletConnectLegacyConnector(walletconnect1ConnectorOptions),
new WalletConnectConnector(walletconnect2ConnectorOptions), new WalletConnectConnector(walletconnect2ConnectorOptions),
new InjectedConnector(injectedConnectorOptions), new InjectedConnector(injectedConnectorOptions),
]; ];
@@ -157,6 +166,19 @@ const createInjectedConnectorWithProvider = (provider: ExternalProvider) =>
provider as unknown as Awaited<ReturnType<InjectedConnector['getProvider']>>; provider as unknown as Awaited<ReturnType<InjectedConnector['getProvider']>>;
})(injectedConnectorOptions) as InjectedConnector; })(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) => const createWalletConnect2ConnectorWithId = (walletconnect2Id: string) =>
new WalletConnectConnector({ new WalletConnectConnector({
...walletconnect2ConnectorOptions, ...walletconnect2ConnectorOptions,
@@ -192,6 +214,9 @@ export const resolveWagmiConnector = ({
return walletConnection.type === WalletConnectionType.InjectedEip1193 && walletConnection.provider return walletConnection.type === WalletConnectionType.InjectedEip1193 && walletConnection.provider
? createInjectedConnectorWithProvider(walletConnection.provider) ? createInjectedConnectorWithProvider(walletConnection.provider)
: walletConnection.type === WalletConnectionType.WalletConnect1 &&
walletConfig.walletconnect1Name
? createWalletConnect1ConnectorWithName(walletConfig.walletconnect1Name)
: walletConnection.type === WalletConnectionType.WalletConnect2 && walletConfig.walletconnect2Id : walletConnection.type === WalletConnectionType.WalletConnect2 && walletConfig.walletconnect2Id
? createWalletConnect2ConnectorWithId(walletConfig.walletconnect2Id) ? createWalletConnect2ConnectorWithId(walletConfig.walletconnect2Id)
: connectors.find(({ id }: { id: string }) => id === walletConnectionConfig.wagmiConnectorId); : connectors.find(({ id }: { id: string }) => id === walletConnectionConfig.wagmiConnectorId);
+6
View File
@@ -45,6 +45,12 @@ export const getWalletConnection = ({
break; break;
} }
case WalletConnectionType.WalletConnect1: {
return {
type: WalletConnectionType.WalletConnect1,
};
}
case WalletConnectionType.WalletConnect2: { case WalletConnectionType.WalletConnect2: {
return { return {
type: WalletConnectionType.WalletConnect2, type: WalletConnectionType.WalletConnect2,