fix(@wallet): Token not displayed after upgrade

fixes #5563
This commit is contained in:
Anthony Laibe 2022-04-18 11:08:17 +02:00 committed by Stefan Dunca
parent cf221eb06e
commit efd6412266
2 changed files with 71 additions and 68 deletions

View File

@ -109,6 +109,74 @@ let DEFAULT_NETWORKS* = %* [
}
]
let NETWORKS* = %* [
{
"chainId": 1,
"chainName": "Ethereum Mainnet",
"rpcUrl": "https://mainnet.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
"blockExplorerUrl": "https://etherscan.io/",
"iconUrl": "",
"nativeCurrencyName": "Ether",
"nativeCurrencySymbol": "ETH",
"nativeCurrencyDecimals": 18,
"isTest": false,
"layer": 1,
"enabled": true,
},
{
"chainId": 3,
"chainName": "Ethereum Ropsten",
"rpcUrl": "https://ropsten.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
"blockExplorerUrl": "https://ropsten.etherscan.io/",
"iconUrl": "",
"nativeCurrencyName": "Ether",
"nativeCurrencySymbol": "ETH",
"nativeCurrencyDecimals": 18,
"isTest": true,
"layer": 1,
"enabled": false,
},
{
"chainId": 4,
"chainName": "Ethereum Rinkeby",
"rpcUrl": "https://rinkeby.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
"blockExplorerUrl": "https://rinkeby.etherscan.io/",
"iconUrl": "",
"nativeCurrencyName": "Ether",
"nativeCurrencySymbol": "ETH",
"nativeCurrencyDecimals": 18,
"isTest": true,
"layer": 1,
"enabled": false,
},
{
"chainId": 5,
"chainName": "Ethereum Goerli",
"rpcUrl": "http://goerli.blockscout.com/",
"blockExplorerUrl": "https://goerli.etherscan.io/",
"iconUrl": "",
"nativeCurrencyName": "Ether",
"nativeCurrencySymbol": "ETH",
"nativeCurrencyDecimals": 18,
"isTest": true,
"layer": 1,
"enabled": false,
},
{
"chainId": 10,
"chainName": "Optimistic Ethereum",
"rpcUrl": "https://optimism-mainnet.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
"blockExplorerUrl": "https://optimistic.etherscan.io",
"iconUrl": "",
"nativeCurrencyName": "Ether",
"nativeCurrencySymbol": "ETH",
"nativeCurrencyDecimals": 18,
"isTest": false,
"layer": 2,
"enabled": true,
}
]
var NODE_CONFIG* = %* {
"BrowsersConfig": {
"Enabled": true
@ -191,73 +259,7 @@ var NODE_CONFIG* = %* {
"EnsConfig": {
"Enabled": true
},
"Networks": [
{
"chainId": 1,
"chainName": "Ethereum Mainnet",
"rpcUrl": "https://mainnet.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
"blockExplorerUrl": "https://etherscan.io/",
"iconUrl": "",
"nativeCurrencyName": "Ether",
"nativeCurrencySymbol": "ETH",
"nativeCurrencyDecimals": 18,
"isTest": false,
"layer": 1,
"enabled": true,
},
{
"chainId": 3,
"chainName": "Ethereum Ropsten",
"rpcUrl": "https://ropsten.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
"blockExplorerUrl": "https://ropsten.etherscan.io/",
"iconUrl": "",
"nativeCurrencyName": "Ether",
"nativeCurrencySymbol": "ETH",
"nativeCurrencyDecimals": 18,
"isTest": true,
"layer": 1,
"enabled": false,
},
{
"chainId": 4,
"chainName": "Ethereum Rinkeby",
"rpcUrl": "https://rinkeby.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
"blockExplorerUrl": "https://rinkeby.etherscan.io/",
"iconUrl": "",
"nativeCurrencyName": "Ether",
"nativeCurrencySymbol": "ETH",
"nativeCurrencyDecimals": 18,
"isTest": true,
"layer": 1,
"enabled": false,
},
{
"chainId": 5,
"chainName": "Ethereum Goerli",
"rpcUrl": "http://goerli.blockscout.com/",
"blockExplorerUrl": "https://goerli.etherscan.io/",
"iconUrl": "",
"nativeCurrencyName": "Ether",
"nativeCurrencySymbol": "ETH",
"nativeCurrencyDecimals": 18,
"isTest": true,
"layer": 1,
"enabled": false,
},
{
"chainId": 10,
"chainName": "Optimistic Ethereum",
"rpcUrl": "https://optimism-mainnet.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
"blockExplorerUrl": "https://optimistic.etherscan.io",
"iconUrl": "",
"nativeCurrencyName": "Ether",
"nativeCurrencySymbol": "ETH",
"nativeCurrencyDecimals": 18,
"isTest": false,
"layer": 2,
"enabled": true,
}
],
"Networks": Networks,
"TorrentConfig": {
"Enabled": false,
"Port": DEFAULT_TORRENT_CONFIG_PORT,

View File

@ -350,7 +350,8 @@ proc login*(self: Service, account: AccountDto, password: string): string =
"DataDir": DEFAULT_TORRENT_CONFIG_DATADIR,
"TorrentDir": DEFAULT_TORRENT_CONFIG_TORRENTDIR,
"Port": DEFAULT_TORRENT_CONFIG_PORT
}
},
"Networks": NETWORKS,
}
let response = status_account.login(account.name, account.keyUid, hashedPassword, thumbnailImage,