Skip to content

Commit

Permalink
Deprecating the Rinkeby, Ropsten, and Kovan test networks (#15989)
Browse files Browse the repository at this point in the history
* Deprecating Rinkeby, setting default debug network to Goerli

* Deprecating Ropsten and Kovan

* Conflict fix

* Remove unused localization, test fixes

* Add migration for moving used deprecated testnets to custom networks

* Fix migrator test

* Add more unit tests

* Migration updates provider type to rpc if deprecated network is selected

* Migration fully and correctly updates the provider if selected network is a deprecated testnet

* Continue to show deprecation warning on each of rinkeby, ropsten and kovan

* Add rpcUrl deprecation message to loading screen

* Removing mayBeFauceting prop

Co-authored-by: Dan Miller <[email protected]>
  • Loading branch information
ryanml and danjm authored Sep 29, 2022
1 parent 99808eb commit 0bc1eea
Show file tree
Hide file tree
Showing 158 changed files with 1,357 additions and 1,991 deletions.
66 changes: 33 additions & 33 deletions .storybook/initial-states/transactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ export const MOCK_TRANSACTION_BY_TYPE = {
id: 643368596521636,
time: 1653527035634,
status: 'submitted',
metamaskNetworkId: '4',
metamaskNetworkId: '5',
originalGasEstimate: '5208',
userEditedGasLimit: false,
chainId: '0x4',
chainId: '0x5',
loadingDefaults: false,
dappSuggestedGasFees: null,
sendFlowHistory: [],
Expand All @@ -50,10 +50,10 @@ export const MOCK_TRANSACTION_BY_TYPE = {
id: 643368596521636,
time: 1653527035634,
status: 'approved',
metamaskNetworkId: '4',
metamaskNetworkId: '5',
originalGasEstimate: '5208',
userEditedGasLimit: false,
chainId: '0x4',
chainId: '0x5',
loadingDefaults: false,
dappSuggestedGasFees: null,
sendFlowHistory: [],
Expand Down Expand Up @@ -204,15 +204,15 @@ export const MOCK_TRANSACTION_BY_TYPE = {
submittedTime: 1653527035924,
},
[MOCK_TX_TYPE.CONTRACT_INTERACTION]: {
chainId: '0x4',
chainId: '0x5',
dappSuggestedGasFees: {
gas: '0x118f4',
maxFeePerGas: '0x9502f91a',
maxPriorityFeePerGas: '0x9502F900',
},
id: 7694052085150913,
loadingDefaults: true,
metamaskNetworkId: '4',
metamaskNetworkId: '5',
origin: 'https://remix.ethereum.org',
originalGasEstimate: '0x118f4',
sendFlowHistory: [],
Expand All @@ -235,7 +235,7 @@ export const MOCK_TRANSACTION_BY_TYPE = {
[MOCK_TX_TYPE.DEPLOY_CONTRACT]: {
blockNumber: '6195527',
id: 4243712234858468,
metamaskNetworkId: '4',
metamaskNetworkId: '5',
status: 'confirmed',
time: 1585088013000,
txParams: {
Expand Down Expand Up @@ -292,7 +292,7 @@ export const MOCK_TRANSACTION_BY_TYPE = {
[MOCK_TX_TYPE.INCOMING]: {
blockNumber: '6477257',
id: 4243712234858505,
metamaskNetworkId: '4',
metamaskNetworkId: '5',
status: 'confirmed',
time: 1589314295000,
txParams: {
Expand Down Expand Up @@ -346,10 +346,10 @@ export const MOCK_TRANSACTION_BY_TYPE = {
id: 3938342322880462,
time: 1653459456297,
status: 'failed',
metamaskNetworkId: '4',
metamaskNetworkId: '5',
originalGasEstimate: '14609',
userEditedGasLimit: false,
chainId: '0x4',
chainId: '0x5',
loadingDefaults: false,
dappSuggestedGasFees: null,
sendFlowHistory: [],
Expand All @@ -376,10 +376,10 @@ export const MOCK_TRANSACTION_BY_TYPE = {
id: 3938342322880462,
time: 1653459456297,
status: 'approved',
metamaskNetworkId: '4',
metamaskNetworkId: '5',
originalGasEstimate: '14609',
userEditedGasLimit: false,
chainId: '0x4',
chainId: '0x5',
loadingDefaults: false,
dappSuggestedGasFees: null,
sendFlowHistory: [],
Expand Down Expand Up @@ -589,7 +589,7 @@ export const MOCK_TRANSACTION_BY_TYPE = {
id: 4243712234858512,
time: 1589314601567,
status: 'confirmed',
metamaskNetworkId: '4',
metamaskNetworkId: '5',
loadingDefaults: false,
txParams: {
from: '0xabca64466f257793eaa52fcfff5066894b76a149',
Expand All @@ -605,7 +605,7 @@ export const MOCK_TRANSACTION_BY_TYPE = {
[MOCK_TX_TYPE.SMART]: {
blockNumber: '6195527',
id: 4243712234858468,
metamaskNetworkId: '4',
metamaskNetworkId: '5',
status: 'confirmed',
time: 1585088013000,
txParams: {
Expand All @@ -625,7 +625,7 @@ export const MOCK_TRANSACTION_BY_TYPE = {
[MOCK_TX_TYPE.SWAP]: {
blockNumber: '6195527',
id: 4243712234858467,
metamaskNetworkId: '4',
metamaskNetworkId: '5',
status: 'confirmed',
time: 1585088013000,
txParams: {
Expand All @@ -644,7 +644,7 @@ export const MOCK_TRANSACTION_BY_TYPE = {
[MOCK_TX_TYPE.SWAP_APPROVAL]: {
blockNumber: '6195527',
id: 4243712234858467,
metamaskNetworkId: '4',
metamaskNetworkId: '5',
status: 'confirmed',
time: 1585088013000,
txParams: {
Expand All @@ -664,10 +664,10 @@ export const MOCK_TRANSACTION_BY_TYPE = {
id: 5177046356058729,
time: 1653457101080,
status: 'submitted',
metamaskNetworkId: '4',
metamaskNetworkId: '5',
originalGasEstimate: '0xb427',
userEditedGasLimit: false,
chainId: '0x4',
chainId: '0x5',
loadingDefaults: false,
dappSuggestedGasFees: {
gasPrice: '0x4a817c800',
Expand All @@ -692,10 +692,10 @@ export const MOCK_TRANSACTION_BY_TYPE = {
id: 5177046356058729,
time: 1653457101080,
status: 'unapproved',
metamaskNetworkId: '4',
metamaskNetworkId: '5',
originalGasEstimate: '0xb427',
userEditedGasLimit: false,
chainId: '0x4',
chainId: '0x5',
loadingDefaults: true,
dappSuggestedGasFees: {
gasPrice: '0x4a817c800',
Expand Down Expand Up @@ -918,10 +918,10 @@ export const MOCK_TRANSACTION_BY_TYPE = {
id: 1441203963845330,
time: 1652206763566,
status: 'confirmed',
metamaskNetworkId: '4',
metamaskNetworkId: '5',
originalGasEstimate: '0x118e0',
userEditedGasLimit: false,
chainId: '0x4',
chainId: '0x5',
loadingDefaults: false,
dappSuggestedGasFees: {
maxPriorityFeePerGas: '0x3B9ACA00',
Expand All @@ -939,7 +939,7 @@ export const MOCK_TRANSACTION_BY_TYPE = {
maxFeePerGas: '0x7be830aec',
maxPriorityFeePerGas: '0x3B9ACA00',
},
origin: 'https://rinkeby.etherscan.io',
origin: 'https://goerli.etherscan.io',
type: 'safetransferfrom',
userFeeLevel: 'dappSuggested',
defaultGasEstimates: {
Expand Down Expand Up @@ -1042,10 +1042,10 @@ export const MOCK_TRANSACTION_BY_TYPE = {
id: 5177046356058725,
time: 1653457077370,
status: 'confirmed',
metamaskNetworkId: '4',
metamaskNetworkId: '5',
originalGasEstimate: '0xea60',
userEditedGasLimit: false,
chainId: '0x4',
chainId: '0x5',
loadingDefaults: false,
dappSuggestedGasFees: {
gasPrice: '0x4a817c800',
Expand All @@ -1055,7 +1055,7 @@ export const MOCK_TRANSACTION_BY_TYPE = {
txParams: {
from: '0xabc539a7d5c43940af498008a7c8f3abb35c3725',
to: '0xefg60bbf4ba1de43f3b4983a539feebfbd5fd976',
nonce: '0x4',
nonce: '0x5',
value: '0x0',
data:
'0xa9059cbb0000000000000000000000002f318c334780961fb129d2a6c30d0763d9a5c9700000000000000000000000000000000000000000000000000000000000003a98',
Expand All @@ -1070,10 +1070,10 @@ export const MOCK_TRANSACTION_BY_TYPE = {
id: 5177046356058725,
time: 1653457077370,
status: 'unapproved',
metamaskNetworkId: '4',
metamaskNetworkId: '5',
originalGasEstimate: '0xea60',
userEditedGasLimit: false,
chainId: '0x4',
chainId: '0x5',
loadingDefaults: true,
dappSuggestedGasFees: {
gasPrice: '0x4a817c800',
Expand Down Expand Up @@ -1152,7 +1152,7 @@ export const MOCK_TRANSACTION_BY_TYPE = {
{
op: 'add',
path: '/txParams/nonce',
value: '0x4',
value: '0x5',
note: 'transactions#approveTransaction',
timestamp: 1653457091939,
},
Expand Down Expand Up @@ -1446,10 +1446,10 @@ export const MOCK_TRANSACTION_BY_TYPE = {
id: 5177046356058754,
time: 1653457323504,
status: 'confirmed',
metamaskNetworkId: '4',
metamaskNetworkId: '5',
originalGasEstimate: '0x10896',
userEditedGasLimit: false,
chainId: '0x4',
chainId: '0x5',
loadingDefaults: false,
dappSuggestedGasFees: null,
sendFlowHistory: [
Expand Down Expand Up @@ -1496,10 +1496,10 @@ export const MOCK_TRANSACTION_BY_TYPE = {
id: 5177046356058754,
time: 1653457323504,
status: 'unapproved',
metamaskNetworkId: '4',
metamaskNetworkId: '5',
originalGasEstimate: '0x10896',
userEditedGasLimit: false,
chainId: '0x4',
chainId: '0x5',
loadingDefaults: true,
dappSuggestedGasFees: null,
sendFlowHistory: [
Expand Down
68 changes: 16 additions & 52 deletions .storybook/test-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,6 @@ const state = {
ticker: 'ETH',
viewOnly: true,
},
{
blockExplorerUrl: 'https://ropsten.etherscan.io',
chainId: '0x3',
iconColor: 'var(--ropsten)',
isATestNetwork: true,
labelKey: 'ropsten',
providerType: 'ropsten',
rpcUrl: 'https://ropsten.infura.io/v3/',
ticker: 'ETH',
viewOnly: true,
},
{
blockExplorerUrl: 'https://rinkeby.etherscan.io',
chainId: '0x4',
iconColor: 'var(--rinkeby)',
isATestNetwork: true,
labelKey: 'rinkeby',
providerType: 'rinkeby',
rpcUrl: 'https://rinkeby.infura.io/v3/',
ticker: 'ETH',
viewOnly: true,
},
{
blockExplorerUrl: 'https://goerli.etherscan.io',
chainId: '0x5',
Expand All @@ -59,17 +37,6 @@ const state = {
ticker: 'ETH',
viewOnly: true,
},
{
blockExplorerUrl: 'https://kovan.etherscan.io',
chainId: '0x2a',
iconColor: 'var(--kovan)',
isATestNetwork: true,
labelKey: 'kovan',
providerType: 'kovan',
rpcUrl: 'https://kovan.infura.io/v3/',
ticker: 'ETH',
viewOnly: true,
},
{
blockExplorerUrl: 'https://sepolia.etherscan.io',
chainId: '0xaa36a7',
Expand Down Expand Up @@ -406,9 +373,9 @@ const state = {
id: 3111025347726181,
time: 1620710815484,
status: 'unapproved',
metamaskNetworkId: '3',
metamaskNetworkId: '5',
msgParams: '0x64a845a5b02460acf8a3d84503b0d68d028b4bb4',
chainId: '0x3',
chainId: '0x5',
loadingDefaults: false,
txParams: {
from: '0x64a845a5b02460acf8a3d84503b0d68d028b4bb4',
Expand All @@ -427,8 +394,8 @@ const state = {
id: 7786962153682822,
time: 1620710815484,
status: 'unapproved',
metamaskNetworkId: '3',
chainId: '0x3',
metamaskNetworkId: '5',
chainId: '0x5',
loadingDefaults: true,
txParams: {
from: '0x64a845a5b02460acf8a3d84503b0d68d028b4bb4',
Expand Down Expand Up @@ -581,20 +548,20 @@ const state = {
swapsWelcomeMessageHasBeenShown: true,
defaultHomeActiveTabName: 'Assets',
provider: {
type: 'rinkeby',
type: 'goerli',
ticker: 'ETH',
nickname: '',
rpcUrl: '',
chainId: '0x4',
chainId: '0x5',
},
previousProviderStore: {
type: 'rinkeby',
type: 'goerli',
ticker: 'ETH',
nickname: '',
rpcUrl: '',
chainId: '0x4',
chainId: '0x5',
},
network: '3',
network: '5',
accounts: {
'0x64a845a5b02460acf8a3d84503b0d68d028b4bb4': {
address: '0x64a845a5b02460acf8a3d84503b0d68d028b4bb4',
Expand Down Expand Up @@ -1132,7 +1099,7 @@ const state = {
'0xb19ac54efa18cc3a14a5b821bfec73d284bf0c5e': '0x2d3142f5000',
'0x9d0ba4ddac06032527b140912ec808ab9451b788': '0x15f6f0b9d4f8d000',
},
'0x3': {
5: {
'0x64a845a5b02460acf8a3d84503b0d68d028b4bb4': '0x176e5b6f173ebe66',
'0xb19ac54efa18cc3a14a5b821bfec73d284bf0c5e': '0x2d3142f5000',
'0x9d0ba4ddac06032527b140912ec808ab9451b788': '0x15f6f0b9d4f8d000',
Expand Down Expand Up @@ -1196,7 +1163,7 @@ const state = {
decimals: 18,
},
],
'0x3': [
'0x5': [
{
address: '0xaD6D458402F60fD3Bd25163575031ACDce07538D',
symbol: 'DAI',
Expand All @@ -1209,7 +1176,7 @@ const state = {
},
accountHiddenTokens: {
'0x64a845a5b02460acf8a3d84503b0d68d028b4bb4': {
'0x3': [],
'0x5': [],
},
},
assetImages: {
Expand Down Expand Up @@ -1317,9 +1284,6 @@ const state = {
},
},
incomingTxLastFetchedBlocksByNetwork: {
ropsten: 8872820,
rinkeby: null,
kovan: null,
goerli: null,
sepolia: null,
mainnet: 10902989,
Expand Down Expand Up @@ -1549,8 +1513,8 @@ const state = {
id: 3111025347726181,
time: 1620723786838,
status: 'unapproved',
metamaskNetworkId: '3',
chainId: '0x3',
metamaskNetworkId: '5',
chainId: '0x5',
loadingDefaults: false,
txParams: {
from: '0x64a845a5b02460acf8a3d84503b0d68d028b4bb4',
Expand All @@ -1569,8 +1533,8 @@ const state = {
id: 3111025347726181,
time: 1620723786838,
status: 'unapproved',
metamaskNetworkId: '3',
chainId: '0x3',
metamaskNetworkId: '5',
chainId: '0x5',
loadingDefaults: true,
txParams: {
from: '0x983211ce699ea5ab57cc528086154b6db1ad8e55',
Expand Down
Loading

0 comments on commit 0bc1eea

Please sign in to comment.