1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-23 20:05:27 +02:00
metamask-extension/ui/app/pages/settings/networks-tab/networks-tab.constants.js

60 lines
1.4 KiB
JavaScript
Raw Normal View History

New settings custom rpc form (#6490) * Add networks tab to settings, with header. * Adds network list to settings network tab. * Adds form to settings networks tab and connects it to network list. * Network tab: form adding and editing working * Settings network form properly handles input errors * Add translations for settings network form * Clean up styles of settings network tab. * Add popup-view styles and behaviour to settings network tab. * Fix save button on settings network form * Adds 'Add Network' button and addMode to settings networks tab * Lint fix for settings networks tab addition * Fix navigation in settings networks tab. * Editing an rpcurl in networks tab does not create new network, just changes rpc of old * Fix layout of settings tabs other than network * Networks dropdown 'Custom Rpc' item links to networks tab in settings. * Update settings sidebar networks subheader. * Make networks tab buttons width consistent with input widths in extension view. * Fix settings screen subheader height in popup view * Fix height of add networks button in popup view * Add optional label to chainId and symbol form labels in networks setting tab * Style fixes for networks tab headers * Add ability to customize block explorer used by custom rpc * Stylistic improvements+fixes to custom rpc form. * Hide cancel button. * Highlight and show network form of provider by default. * Standardize network subheader name to 'Networks' * Update e2e tests for new settings network form * Update unit tests for new rpcPrefs prop * Extract blockexplorer url construction into method. * Fix broken styles on non-network tabs in popup mode * Fix block explorer url links for cases when provider in state has not been updated. * Fix vertical spacing of network form * Don't allow click of save button on network form if nothing has changed * Ensure add network button is shown in popup view * Lint fix for networks tab * Fix block explorer url preference setting. * Fix e2e tests for custom blockexplorer in account details modal changes. * Update integration test states to include frequentRpcList property * Fix some capitalizations in en/messages.json * Remove some console.logs added during custom rpc form work * Fix external account link text and url for modal and dropdown. * Documentation, url validation, proptype required additions and lint fixes on network tab and form.
2019-05-09 19:27:14 +02:00
const defaultNetworksData = [
{
labelKey: 'mainnet',
iconColor: '#29B6AF',
providerType: 'mainnet',
rpcUrl: 'https://api.infura.io/v1/jsonrpc/mainnet',
chainId: '1',
ticker: 'ETH',
blockExplorerUrl: 'https://etherscan.io',
},
{
labelKey: 'ropsten',
iconColor: '#FF4A8D',
providerType: 'ropsten',
rpcUrl: 'https://api.infura.io/v1/jsonrpc/ropsten',
chainId: '3',
ticker: 'ETH',
blockExplorerUrl: 'https://ropsten.etherscan.io',
},
{
labelKey: 'kovan',
iconColor: '#9064FF',
providerType: 'kovan',
rpcUrl: 'https://api.infura.io/v1/jsonrpc/kovan',
chainId: '4',
ticker: 'ETH',
blockExplorerUrl: 'https://etherscan.io',
},
{
labelKey: 'rinkeby',
iconColor: '#F6C343',
providerType: 'rinkeby',
rpcUrl: 'https://api.infura.io/v1/jsonrpc/rinkeby',
chainId: '42',
ticker: 'ETH',
blockExplorerUrl: 'https://rinkeby.etherscan.io',
},
{
labelKey: 'goerli',
iconColor: '#3099f2',
providerType: 'goerli',
rpcUrl: 'https://api.infura.io/v1/jsonrpc/goerli',
chainId: '5',
ticker: 'ETH',
blockExplorerUrl: 'https://goerli.etherscan.io',
},
New settings custom rpc form (#6490) * Add networks tab to settings, with header. * Adds network list to settings network tab. * Adds form to settings networks tab and connects it to network list. * Network tab: form adding and editing working * Settings network form properly handles input errors * Add translations for settings network form * Clean up styles of settings network tab. * Add popup-view styles and behaviour to settings network tab. * Fix save button on settings network form * Adds 'Add Network' button and addMode to settings networks tab * Lint fix for settings networks tab addition * Fix navigation in settings networks tab. * Editing an rpcurl in networks tab does not create new network, just changes rpc of old * Fix layout of settings tabs other than network * Networks dropdown 'Custom Rpc' item links to networks tab in settings. * Update settings sidebar networks subheader. * Make networks tab buttons width consistent with input widths in extension view. * Fix settings screen subheader height in popup view * Fix height of add networks button in popup view * Add optional label to chainId and symbol form labels in networks setting tab * Style fixes for networks tab headers * Add ability to customize block explorer used by custom rpc * Stylistic improvements+fixes to custom rpc form. * Hide cancel button. * Highlight and show network form of provider by default. * Standardize network subheader name to 'Networks' * Update e2e tests for new settings network form * Update unit tests for new rpcPrefs prop * Extract blockexplorer url construction into method. * Fix broken styles on non-network tabs in popup mode * Fix block explorer url links for cases when provider in state has not been updated. * Fix vertical spacing of network form * Don't allow click of save button on network form if nothing has changed * Ensure add network button is shown in popup view * Lint fix for networks tab * Fix block explorer url preference setting. * Fix e2e tests for custom blockexplorer in account details modal changes. * Update integration test states to include frequentRpcList property * Fix some capitalizations in en/messages.json * Remove some console.logs added during custom rpc form work * Fix external account link text and url for modal and dropdown. * Documentation, url validation, proptype required additions and lint fixes on network tab and form.
2019-05-09 19:27:14 +02:00
{
labelKey: 'localhost',
iconColor: 'white',
border: '1px solid #6A737D',
providerType: 'localhost',
rpcUrl: 'http://localhost:8545/',
blockExplorerUrl: 'https://etherscan.io',
},
]
export {
defaultNetworksData,
}