1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +01:00

E2e test fixtures (#16061)

* remove state.json files

* move file

* Update Readme

* Create fixture builder

* load test fixture

* remove redundant method

* update snap tests

* update stats tests

* update extension tests

* update extension tests

* Update fixture data

* snap test dapp connection

* Update fixture data

* add onboarding fixture

* use onboarding fixture

* reuse import account vault

* remove unnecessary use of class

* use fixture builder in new tests

* switch to function

* update default fixture

* update default fixture

* update test

* update 1559 test fixttures

* update 1559 test fixtures

* update 1559 test fixtures

* dismiss 3box whats new

* remove redundant code

* move docs

* remove unused code

* token detection

* use default timeout

* remove redundant code

* Update fixture builder

hide `Protect your funds` dialog
remove browser environment
remove default network details
hide dismiss seed backup reminder
recursively merges fixture data

* add token to tokencontroller

* remove network details

* add missing identities to preference controller

* remove duplicate properties

* update bip-32 to use fixturebuilder

* alphabetise snap permissions

* update get snaps to use fixturebuilder

* Update test-snap-bip-32.spec.js

wait for window

* add popular network state

* update test

* lint
This commit is contained in:
Peter Yinusa 2022-10-28 09:42:12 +01:00 committed by GitHub
parent 012e9fab9d
commit 0b4532ec1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
78 changed files with 1534 additions and 3608 deletions

View File

@ -1,10 +1,3 @@
# End-to-end tests
This directory contains the fixture data used to bootstrap the individual e2e tests. Each sub-directory contains
one thing:
1. A `state.json` file that represents a the saved state for the extension (see _Generating fixture data_ below)
## Generating fixture data
Fixture data can be generated by following these steps:

View File

@ -13,13 +13,16 @@ const {
} = require('../helpers/file');
const { withFixtures, tinyDelayMs } = require('./helpers');
const { PAGES } = require('./webdriver/driver');
const FixtureBuilder = require('./fixture-builder');
const DEFAULT_NUM_SAMPLES = 20;
const ALL_PAGES = Object.values(PAGES);
async function measurePage(pageName) {
let metrics;
await withFixtures({ fixtures: 'imported-account' }, async ({ driver }) => {
await withFixtures(
{ fixtures: new FixtureBuilder().build() },
async ({ driver }) => {
await driver.delay(tinyDelayMs);
await driver.navigate();
await driver.fill('#password', 'correct horse battery staple');
@ -28,7 +31,8 @@ async function measurePage(pageName) {
await driver.navigate(pageName);
await driver.delay(1000);
metrics = await driver.collectMetrics();
});
},
);
return metrics;
}

1002
test/e2e/fixture-builder.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,3 @@
const { promises: fs } = require('fs');
const path = require('path');
const Koa = require('koa');
const { isObject, mapValues } = require('lodash');
@ -57,7 +55,6 @@ class FixtureServer {
constructor() {
this._app = new Koa();
this._stateMap = new Map([[DEFAULT_STATE_KEY, Object.create(null)]]);
this._initialStateCache = new Map();
this._app.use(async (ctx) => {
// Firefox is _super_ strict about needing CORS headers
@ -94,19 +91,8 @@ class FixtureServer {
});
}
async loadState(directory) {
const statePath = path.resolve(__dirname, directory, 'state.json');
let state;
if (this._initialStateCache.has(statePath)) {
state = this._initialStateCache.get(statePath);
} else {
const data = await fs.readFile(statePath);
const rawState = JSON.parse(data.toString('utf-8'));
state = performStateSubstitutions(rawState);
this._initialStateCache.set(statePath, state);
}
loadJsonState(rawState) {
const state = performStateSubstitutions(rawState);
this._stateMap.set(CURRENT_STATE_KEY, state);
}

View File

@ -1,169 +0,0 @@
{
"data": {
"AddressBookController": {
"addressBook": {
"0x539": {
"0x2f318C334780961FB129D2a6c30D0763d9a5C970": {
"address": "0x2f318C334780961FB129D2a6c30D0763d9a5C970",
"chainId": "0x539",
"isEns": false,
"memo": "",
"name": "Test Name 1"
}
}
}
},
"AppStateController": {
"mkrMigrationReminderTimestamp": null,
"swapsWelcomeMessageHasBeenShown": true,
"showPortfolioTooltip": false
},
"CachedBalancesController": {
"cachedBalances": {
"4": {}
}
},
"CurrencyController": {
"conversionDate": 1575697244.188,
"conversionRate": 149.61,
"currentCurrency": "usd",
"nativeCurrency": "ETH"
},
"IncomingTransactionsController": {
"incomingTransactions": {},
"incomingTxLastFetchedBlocksByNetwork": {
"goerli": null,
"mainnet": null,
"sepolia": null
}
},
"KeyringController": {
"vault": "{\"data\":\"s6TpYjlUNsn7ifhEFTkuDGBUM1GyOlPrim7JSjtfIxgTt8/6MiXgiR/CtFfR4dWW2xhq85/NGIBYEeWrZThGdKGarBzeIqBfLFhw9n509jprzJ0zc2Rf+9HVFGLw+xxC4xPxgCS0IIWeAJQ+XtGcHmn0UZXriXm8Ja4kdlow6SWinB7sr/WM3R0+frYs4WgllkwggDf2/Tv6VHygvLnhtzp6hIJFyTjh+l/KnyJTyZW1TkZhDaNDzX3SCOHT\",\"iv\":\"FbeHDAW5afeWNORfNJBR0Q==\",\"salt\":\"TxZ+WbCW6891C9LK/hbMAoUsSEW1E8pyGLVBU6x5KR8=\"}"
},
"NetworkController": {
"network": "1337",
"provider": {
"nickname": "Localhost 8545",
"rpcUrl": "http://localhost:8545",
"chainId": "0x539",
"ticker": "ETH",
"type": "rpc"
}
},
"NotificationController": {
"notifications": {
"1": {
"isShown": true
},
"3": {
"isShown": true
},
"5": {
"isShown": true
},
"6": {
"isShown": true
},
"8": {
"isShown": true
},
"10": {
"isShown": true
},
"11": {
"isShown": true
},
"12": {
"isShown": true
},
"14": {
"isShown": true
},
"15": {
"isShown": true
}
}
},
"OnboardingController": {
"onboardingTabs": {},
"seedPhraseBackedUp": false
},
"PermissionsMetadata": {
"domainMetadata": {
"metamask.github.io": {
"icon": null,
"name": "M E T A M A S K M E S H T E S T"
}
},
"permissionsHistory": {},
"permissionsLog": [
{
"id": 746677923,
"method": "eth_accounts",
"methodType": "restricted",
"origin": "metamask.github.io",
"request": {
"id": 746677923,
"jsonrpc": "2.0",
"method": "eth_accounts",
"origin": "metamask.github.io",
"params": []
},
"requestTime": 1575697241368,
"response": {
"id": 746677923,
"jsonrpc": "2.0",
"result": []
},
"responseTime": 1575697241370,
"success": true
}
]
},
"PreferencesController": {
"accountTokens": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"goerli": [],
"sepolia": []
}
},
"assetImages": {},
"completedOnboarding": true,
"currentLocale": "en",
"featureFlags": {
"showIncomingTransactions": true,
"transactionTime": false
},
"firstTimeFlowType": "create",
"forgottenPassword": false,
"frequentRpcListDetail": [],
"identities": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"address": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"name": "Account 1"
}
},
"knownMethodData": {},
"lostIdentities": {},
"metaMetricsId": null,
"participateInMetaMetrics": false,
"preferences": {
"useNativeCurrencyAsPrimaryCurrency": true
},
"selectedAddress": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"suggestedTokens": {},
"tokens": [],
"useBlockie": false,
"useNonceField": false,
"usePhishDetect": true
},
"config": {},
"firstTimeInfo": {
"date": 1575697234195,
"version": "7.7.0"
}
},
"meta": {
"version": 40
}
}

View File

@ -1,200 +0,0 @@
{
"data": {
"AppStateController": {
"connectedStatusPopoverHasBeenShown": false,
"showPortfolioTooltip": false
},
"CachedBalancesController": {
"cachedBalances": {
"4": {},
"1337": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": "0x15af1d78b58c40000"
}
}
},
"CurrencyController": {
"conversionDate": 1594348502.519,
"conversionRate": 240.09,
"currentCurrency": "usd",
"nativeCurrency": "ETH"
},
"IncomingTransactionsController": {
"incomingTransactions": {},
"incomingTxLastFetchedBlocksByNetwork": {
"goerli": null,
"mainnet": null,
"sepolia": null,
"localhost": 98
}
},
"KeyringController": {
"vault": "{\"data\":\"s6TpYjlUNsn7ifhEFTkuDGBUM1GyOlPrim7JSjtfIxgTt8/6MiXgiR/CtFfR4dWW2xhq85/NGIBYEeWrZThGdKGarBzeIqBfLFhw9n509jprzJ0zc2Rf+9HVFGLw+xxC4xPxgCS0IIWeAJQ+XtGcHmn0UZXriXm8Ja4kdlow6SWinB7sr/WM3R0+frYs4WgllkwggDf2/Tv6VHygvLnhtzp6hIJFyTjh+l/KnyJTyZW1TkZhDaNDzX3SCOHT\",\"iv\":\"FbeHDAW5afeWNORfNJBR0Q==\",\"salt\":\"TxZ+WbCW6891C9LK/hbMAoUsSEW1E8pyGLVBU6x5KR8=\"}"
},
"NetworkController": {
"provider": {
"nickname": "Localhost 8545",
"rpcUrl": "http://localhost:8545",
"chainId": "0x539",
"ticker": "ETH",
"type": "rpc"
},
"network": "1337"
},
"NotificationController": {
"notifications": {
"1": {
"isShown": true
},
"3": {
"isShown": true
},
"5": {
"isShown": true
},
"6": {
"isShown": true
},
"8": {
"isShown": true
},
"10": {
"isShown": true
},
"11": {
"isShown": true
},
"12": {
"isShown": true
},
"14": {
"isShown": true
},
"15": {
"isShown": true
}
}
},
"OnboardingController": {
"onboardingTabs": {},
"seedPhraseBackedUp": false
},
"PermissionsMetadata": {
"permissionsLog": [
{
"id": 1764280960,
"method": "eth_requestAccounts",
"methodType": "restricted",
"origin": "http://127.0.0.1:8080",
"request": {
"method": "eth_requestAccounts",
"jsonrpc": "2.0",
"id": 1764280960,
"origin": "http://127.0.0.1:8080",
"tabId": 2
},
"requestTime": 1594348329232,
"response": {
"id": 1764280960,
"jsonrpc": "2.0",
"result": ["0x5cfe73b6021e818b776b421b1c4db2474086a7e1"]
},
"responseTime": 1594348332276,
"success": true
}
],
"permissionsHistory": {
"http://127.0.0.1:8080": {
"eth_accounts": {
"accounts": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": 1594348332276
},
"lastApproved": 1594348332276
}
}
},
"domainMetadata": {
"http://127.0.0.1:8080": {
"name": "E2E Test Dapp",
"icon": "http://127.0.0.1:8080/metamask-fox.svg",
"lastUpdated": 1594348323811,
"host": "127.0.0.1:8080"
}
}
},
"PreferencesController": {
"frequentRpcListDetail": [],
"accountTokens": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"goerli": [],
"sepolia": []
}
},
"assetImages": {},
"tokens": [],
"suggestedTokens": {},
"useBlockie": false,
"useNonceField": false,
"usePhishDetect": true,
"featureFlags": {
"showIncomingTransactions": true,
"transactionTime": false
},
"knownMethodData": {},
"participateInMetaMetrics": false,
"firstTimeFlowType": "create",
"currentLocale": "en",
"identities": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"address": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"name": "Account 1"
}
},
"lostIdentities": {},
"forgottenPassword": false,
"preferences": {
"useNativeCurrencyAsPrimaryCurrency": true
},
"completedOnboarding": true,
"metaMetricsId": null,
"ipfsGateway": "dweb.link",
"selectedAddress": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1"
},
"config": {},
"firstTimeInfo": {
"date": 1575697234195,
"version": "7.7.0"
},
"PermissionsController": {
"permissionsRequests": [],
"permissionsDescriptions": {},
"domains": {
"http://127.0.0.1:8080": {
"permissions": [
{
"@context": ["https://github.com/MetaMask/rpc-cap"],
"parentCapability": "eth_accounts",
"id": "f55a1c15-ea48-4088-968e-63be474d42fa",
"date": 1594348332268,
"invoker": "http://127.0.0.1:8080",
"caveats": [
{
"type": "limitResponseLength",
"value": 1,
"name": "primaryAccountOnly"
},
{
"type": "filterResponse",
"value": ["0x5cfe73b6021e818b776b421b1c4db2474086a7e1"],
"name": "exposedAccounts"
}
]
}
]
}
}
}
},
"meta": {
"version": 47
}
}

View File

@ -1,170 +0,0 @@
{
"data": {
"AppStateController": {
"mkrMigrationReminderTimestamp": null,
"showPortfolioTooltip": false
},
"CachedBalancesController": {
"cachedBalances": {
"4": {}
}
},
"CurrencyController": {
"conversionDate": 1575697244.188,
"conversionRate": 149.61,
"currentCurrency": "usd",
"nativeCurrency": "ETH"
},
"IncomingTransactionsController": {
"incomingTransactions": {},
"incomingTxLastFetchedBlocksByNetwork": {
"goerli": null,
"mainnet": null,
"sepolia": null
}
},
"KeyringController": {
"vault": "{\"data\":\"s6TpYjlUNsn7ifhEFTkuDGBUM1GyOlPrim7JSjtfIxgTt8/6MiXgiR/CtFfR4dWW2xhq85/NGIBYEeWrZThGdKGarBzeIqBfLFhw9n509jprzJ0zc2Rf+9HVFGLw+xxC4xPxgCS0IIWeAJQ+XtGcHmn0UZXriXm8Ja4kdlow6SWinB7sr/WM3R0+frYs4WgllkwggDf2/Tv6VHygvLnhtzp6hIJFyTjh+l/KnyJTyZW1TkZhDaNDzX3SCOHT\",\"iv\":\"FbeHDAW5afeWNORfNJBR0Q==\",\"salt\":\"TxZ+WbCW6891C9LK/hbMAoUsSEW1E8pyGLVBU6x5KR8=\"}"
},
"NetworkController": {
"network": "1337",
"provider": {
"nickname": "Localhost 8545",
"rpcUrl": "http://localhost:8545",
"chainId": "0x539",
"ticker": "ETH",
"type": "rpc"
}
},
"NotificationController": {
"notifications": {
"1": {
"isShown": true
},
"3": {
"isShown": true
},
"5": {
"isShown": true
},
"6": {
"isShown": true
},
"8": {
"isShown": true
},
"10": {
"isShown": true
},
"11": {
"isShown": true
},
"12": {
"isShown": true
},
"14": {
"isShown": true
},
"15": {
"isShown": true
}
}
},
"OnboardingController": {
"onboardingTabs": {},
"seedPhraseBackedUp": false
},
"PermissionsMetadata": {
"domainMetadata": {
"metamask.github.io": {
"icon": null,
"name": "M E T A M A S K M E S H T E S T"
}
},
"permissionsHistory": {},
"permissionsLog": [
{
"id": 746677923,
"method": "eth_accounts",
"methodType": "restricted",
"origin": "metamask.github.io",
"request": {
"id": 746677923,
"jsonrpc": "2.0",
"method": "eth_accounts",
"origin": "metamask.github.io",
"params": []
},
"requestTime": 1575697241368,
"response": {
"id": 746677923,
"jsonrpc": "2.0",
"result": []
},
"responseTime": 1575697241370,
"success": true
}
]
},
"PreferencesController": {
"frequentRpcListDetail": [
{
"rpcUrl": "http://127.0.0.1:8545/1",
"chainId": "0x539",
"ticker": "ETH",
"nickname": "http://127.0.0.1:8545/1",
"rpcPrefs": {}
},
{
"rpcUrl": "http://127.0.0.1:8545/2",
"chainId": "0x539",
"ticker": "ETH",
"nickname": "http://127.0.0.1:8545/2",
"rpcPrefs": {}
}
],
"accountTokens": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"goerli": [],
"sepolia": []
}
},
"assetImages": {},
"completedOnboarding": true,
"currentLocale": "en",
"featureFlags": {
"showIncomingTransactions": true,
"transactionTime": false
},
"firstTimeFlowType": "create",
"forgottenPassword": false,
"identities": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"address": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"name": "Account 1"
}
},
"knownMethodData": {},
"lostIdentities": {},
"metaMetricsId": null,
"participateInMetaMetrics": false,
"preferences": {
"useNativeCurrencyAsPrimaryCurrency": true
},
"selectedAddress": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"suggestedTokens": {},
"tokens": [],
"useBlockie": false,
"useNonceField": false,
"usePhishDetect": true
},
"config": {},
"firstTimeInfo": {
"date": 1575697234195,
"version": "7.7.0"
}
},
"meta": {
"version": 40
}
}

View File

@ -1,178 +0,0 @@
{
"data": {
"AlertController": {
"alertEnabledness": {
"unconnectedAccount": true,
"web3ShimUsage": true
},
"unconnectedAccountAlertShownOrigins": {},
"web3ShimUsageOrigins": {}
},
"AppStateController": {
"connectedStatusPopoverHasBeenShown": true,
"defaultHomeActiveTabName": null,
"recoveryPhraseReminderHasBeenShown": true,
"recoveryPhraseReminderLastShown": "__FIXTURE_SUBSTITUTION__currentDateInMilliseconds",
"showPortfolioTooltip": false
},
"CachedBalancesController": {
"cachedBalances": {
"0x5": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": "0x0"
}
}
},
"CurrencyController": {
"conversionDate": 1626907353.891,
"conversionRate": 1968.5,
"currentCurrency": "usd",
"nativeCurrency": "ETH",
"pendingCurrentCurrency": null,
"pendingNativeCurrency": null,
"usdConversionRate": 1968.5
},
"IncomingTransactionsController": {
"incomingTransactions": {},
"incomingTxLastFetchedBlockByChainId": {
"0x1": null,
"0x5": 8977934
}
},
"KeyringController": {
"vault": "{\"data\":\"s6TpYjlUNsn7ifhEFTkuDGBUM1GyOlPrim7JSjtfIxgTt8/6MiXgiR/CtFfR4dWW2xhq85/NGIBYEeWrZThGdKGarBzeIqBfLFhw9n509jprzJ0zc2Rf+9HVFGLw+xxC4xPxgCS0IIWeAJQ+XtGcHmn0UZXriXm8Ja4kdlow6SWinB7sr/WM3R0+frYs4WgllkwggDf2/Tv6VHygvLnhtzp6hIJFyTjh+l/KnyJTyZW1TkZhDaNDzX3SCOHT\",\"iv\":\"FbeHDAW5afeWNORfNJBR0Q==\",\"salt\":\"TxZ+WbCW6891C9LK/hbMAoUsSEW1E8pyGLVBU6x5KR8=\"}"
},
"MetaMetricsController": {
"metaMetricsId": "0xff3e952b9f5a27ffcab42b0b4abf689e77dcc1f9f441871dc962d622b089fb51",
"participateInMetaMetrics": true
},
"NetworkController": {
"network": "1337",
"networkDetails": {
"EIPS": {}
},
"previousProviderStore": {
"chainId": "0x5",
"ticker": "ETH",
"type": "goerli"
},
"provider": {
"chainId": "0x539",
"nickname": "Localhost 8545",
"rpcPrefs": {},
"rpcUrl": "http://localhost:8545",
"ticker": "ETH",
"type": "rpc"
}
},
"NotificationController": {
"notifications": {
"8": {
"isShown": true
},
"10": {
"isShown": true
},
"11": {
"isShown": true
},
"12": {
"isShown": true
},
"14": {
"isShown": true
},
"15": {
"isShown": true
}
}
},
"OnboardingController": {
"onboardingTabs": {},
"seedPhraseBackedUp": true
},
"PermissionsController": {
"domains": {},
"permissionsDescriptions": {},
"permissionsRequests": []
},
"PreferencesController": {
"completedOnboarding": true,
"currentLocale": "en",
"dismissSeedBackUpReminder": true,
"featureFlags": {
"showIncomingTransactions": true
},
"firstTimeFlowType": "import",
"forgottenPassword": false,
"frequentRpcListDetail": [
{
"chainId": "0x539",
"nickname": "Localhost 8545",
"rpcPrefs": {},
"rpcUrl": "http://localhost:8545",
"ticker": "ETH"
}
],
"identities": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"address": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"lastSelected": 1626907346643,
"name": "Account 1"
}
},
"infuraBlocked": false,
"ipfsGateway": "dweb.link",
"knownMethodData": {},
"lostIdentities": {},
"preferences": {
"hideZeroBalanceTokens": false,
"showFiatInTestnets": false,
"useNativeCurrencyAsPrimaryCurrency": true
},
"selectedAddress": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"useBlockie": false,
"useLedgerLive": false,
"useNonceField": false,
"usePhishDetect": true,
"useStaticTokenList": false
},
"TokensController": {
"allTokens": {
"0x539": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": [
{
"address": "0x86002be4cdd922de1ccb831582bf99284b99ac12",
"decimals": 4,
"image": null,
"isERC721": false,
"symbol": "TST"
}
]
}
},
"ignoredTokens": [],
"suggestedAssets": [],
"allIgnoredTokens": {},
"tokens": [
{
"address": "0x86002be4cdd922de1ccb831582bf99284b99ac12",
"decimals": 4,
"image": null,
"isERC721": false,
"symbol": "TST"
}
]
},
"TransactionController": {
"transactions": {}
},
"config": {},
"firstTimeInfo": {
"date": 1626907328205,
"version": "9.8.1"
}
},
"meta": {
"version": 63
}
}

View File

@ -1,160 +0,0 @@
{
"data": {
"AppStateController": {
"mkrMigrationReminderTimestamp": null,
"swapsWelcomeMessageHasBeenShown": true,
"showPortfolioTooltip": false
},
"CachedBalancesController": {
"cachedBalances": {
"4": {}
}
},
"CurrencyController": {
"conversionDate": 1575697244.188,
"conversionRate": 149.61,
"currentCurrency": "usd",
"nativeCurrency": "ETH"
},
"IncomingTransactionsController": {
"incomingTransactions": {},
"incomingTxLastFetchedBlocksByNetwork": {
"goerli": null,
"mainnet": null,
"sepolia": null
}
},
"KeyringController": {
"vault": "{\"data\":\"s6TpYjlUNsn7ifhEFTkuDGBUM1GyOlPrim7JSjtfIxgTt8/6MiXgiR/CtFfR4dWW2xhq85/NGIBYEeWrZThGdKGarBzeIqBfLFhw9n509jprzJ0zc2Rf+9HVFGLw+xxC4xPxgCS0IIWeAJQ+XtGcHmn0UZXriXm8Ja4kdlow6SWinB7sr/WM3R0+frYs4WgllkwggDf2/Tv6VHygvLnhtzp6hIJFyTjh+l/KnyJTyZW1TkZhDaNDzX3SCOHT\",\"iv\":\"FbeHDAW5afeWNORfNJBR0Q==\",\"salt\":\"TxZ+WbCW6891C9LK/hbMAoUsSEW1E8pyGLVBU6x5KR8=\"}"
},
"NetworkController": {
"network": "1337",
"provider": {
"nickname": "Localhost 8545",
"rpcUrl": "http://localhost:8545",
"chainId": "0x539",
"ticker": "ETH",
"type": "rpc"
}
},
"NotificationController": {
"notifications": {
"1": {
"isShown": true
},
"3": {
"isShown": true
},
"5": {
"isShown": true
},
"6": {
"isShown": true
},
"8": {
"isShown": true
},
"10": {
"isShown": true
},
"11": {
"isShown": true
},
"12": {
"isShown": true
},
"14": {
"isShown": true
},
"15": {
"isShown": true
}
}
},
"OnboardingController": {
"onboardingTabs": {},
"seedPhraseBackedUp": false
},
"PermissionsMetadata": {
"domainMetadata": {
"metamask.github.io": {
"icon": null,
"name": "M E T A M A S K M E S H T E S T"
}
},
"permissionsHistory": {},
"permissionsLog": [
{
"id": 746677923,
"method": "eth_accounts",
"methodType": "restricted",
"origin": "metamask.github.io",
"request": {
"id": 746677923,
"jsonrpc": "2.0",
"method": "eth_accounts",
"origin": "metamask.github.io",
"params": []
},
"requestTime": 1575697241368,
"response": {
"id": 746677923,
"jsonrpc": "2.0",
"result": []
},
"responseTime": 1575697241370,
"success": true
}
]
},
"PreferencesController": {
"accountTokens": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"goerli": [],
"sepolia": []
}
},
"assetImages": {},
"completedOnboarding": true,
"eip1559V2Enabled": true,
"currentLocale": "en",
"featureFlags": {
"showIncomingTransactions": true,
"transactionTime": false
},
"firstTimeFlowType": "create",
"forgottenPassword": false,
"frequentRpcListDetail": [],
"identities": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"address": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"name": "Account 1"
}
},
"knownMethodData": {},
"lostIdentities": {},
"metaMetricsId": null,
"participateInMetaMetrics": false,
"preferences": {
"useNativeCurrencyAsPrimaryCurrency": true
},
"selectedAddress": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"suggestedTokens": {},
"tokens": [],
"useBlockie": false,
"useNonceField": false,
"usePhishDetect": true
},
"TransactionController": {
"transactions": {}
},
"config": {},
"firstTimeInfo": {
"date": 1575697234195,
"version": "7.7.0"
}
},
"meta": {
"version": 40
}
}

View File

@ -1,229 +0,0 @@
{
"data": {
"AppStateController": {
"mkrMigrationReminderTimestamp": null,
"swapsWelcomeMessageHasBeenShown": true,
"showPortfolioTooltip": false
},
"CachedBalancesController": {
"cachedBalances": {
"4": {}
}
},
"CurrencyController": {
"conversionDate": 1575697244.188,
"conversionRate": 149.61,
"currentCurrency": "usd",
"nativeCurrency": "ETH"
},
"IncomingTransactionsController": {
"incomingTransactions": {},
"incomingTxLastFetchedBlocksByNetwork": {
"goerli": null,
"mainnet": null,
"sepolia": null
}
},
"KeyringController": {
"vault": "{\"data\":\"s6TpYjlUNsn7ifhEFTkuDGBUM1GyOlPrim7JSjtfIxgTt8/6MiXgiR/CtFfR4dWW2xhq85/NGIBYEeWrZThGdKGarBzeIqBfLFhw9n509jprzJ0zc2Rf+9HVFGLw+xxC4xPxgCS0IIWeAJQ+XtGcHmn0UZXriXm8Ja4kdlow6SWinB7sr/WM3R0+frYs4WgllkwggDf2/Tv6VHygvLnhtzp6hIJFyTjh+l/KnyJTyZW1TkZhDaNDzX3SCOHT\",\"iv\":\"FbeHDAW5afeWNORfNJBR0Q==\",\"salt\":\"TxZ+WbCW6891C9LK/hbMAoUsSEW1E8pyGLVBU6x5KR8=\"}"
},
"NetworkController": {
"network": "1337",
"provider": {
"nickname": "Localhost 8545",
"rpcUrl": "http://localhost:8545",
"chainId": "0x539",
"ticker": "ETH",
"type": "rpc"
}
},
"NotificationController": {
"notifications": {
"1": {
"isShown": true
},
"3": {
"isShown": true
},
"5": {
"isShown": true
},
"6": {
"isShown": true
},
"8": {
"isShown": true
},
"10": {
"isShown": true
},
"11": {
"isShown": true
},
"12": {
"isShown": true
},
"14": {
"isShown": true
},
"15": {
"isShown": true
}
}
},
"OnboardingController": {
"onboardingTabs": {},
"seedPhraseBackedUp": false
},
"PermissionsMetadata": {
"domainMetadata": {
"metamask.github.io": {
"icon": null,
"name": "M E T A M A S K M E S H T E S T"
}
},
"permissionsHistory": {},
"permissionsLog": [
{
"id": 746677923,
"method": "eth_accounts",
"methodType": "restricted",
"origin": "metamask.github.io",
"request": {
"id": 746677923,
"jsonrpc": "2.0",
"method": "eth_accounts",
"origin": "metamask.github.io",
"params": []
},
"requestTime": 1575697241368,
"response": {
"id": 746677923,
"jsonrpc": "2.0",
"result": []
},
"responseTime": 1575697241370,
"success": true
}
]
},
"PreferencesController": {
"accountTokens": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"goerli": [],
"sepolia": []
}
},
"assetImages": {},
"completedOnboarding": true,
"eip1559V2Enabled": true,
"currentLocale": "en",
"featureFlags": {
"showIncomingTransactions": true,
"transactionTime": false
},
"firstTimeFlowType": "create",
"forgottenPassword": false,
"frequentRpcListDetail": [],
"identities": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"address": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"name": "Account 1"
}
},
"knownMethodData": {},
"lostIdentities": {},
"metaMetricsId": null,
"participateInMetaMetrics": false,
"preferences": {
"useNativeCurrencyAsPrimaryCurrency": true
},
"selectedAddress": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"suggestedTokens": {},
"tokens": [],
"useBlockie": false,
"useNonceField": false,
"usePhishDetect": true
},
"TransactionController": {
"transactions": {
"4046084157914634": {
"chainId": "0x539",
"primaryTransaction": {
"chainId": "0x539",
"id": 4046084157914634,
"loadingDefaults": true,
"metamaskNetworkId": "1337",
"origin": "metamask",
"status": "unapproved",
"time": 1617228030067,
"txParams": {
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"gas": "0x61a8",
"maxFeePerGas": "0x59682f0c",
"maxPriorityFeePerGas": "0x59682f00",
"type": "0x2",
"to": "0x2f318C334780961FB129D2a6c30D0763d9a5C970",
"value": "0x1e87F85809dc0000"
},
"type": "sentEther"
},
"history": [
{
"chainId": "0x539",
"id": 4046084157914634,
"loadingDefaults": true,
"metamaskNetworkId": "1337",
"origin": "metamask",
"status": "unapproved",
"time": 1617228030067,
"txParams": {
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"gas": "0x61a8",
"maxFeePerGas": "0x59682f0c",
"maxPriorityFeePerGas": "0x59682f00",
"type": "0x2",
"to": "0x2f318C334780961FB129D2a6c30D0763d9a5C970",
"value": "0x1e87F85809dc0000"
},
"type": "simpleSend"
},
[
{
"note": "Added new unapproved transaction.",
"op": "replace",
"path": "/loadingDefaults",
"timestamp": 1617228030069,
"value": false
}
]
],
"id": 4046084157914634,
"loadingDefaults": false,
"metamaskNetworkId": "1337",
"origin": "metamask",
"status": "unapproved",
"time": 1617228030067,
"txParams": {
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"gas": "0x61a8",
"maxFeePerGas": "0x59682f0c",
"maxPriorityFeePerGas": "0x59682f00",
"type": "0x2",
"to": "0x2f318C334780961FB129D2a6c30D0763d9a5C970",
"value": "0x1e87F85809dc0000"
},
"type": "simpleSend"
}
}
},
"config": {},
"firstTimeInfo": {
"date": 1575697234195,
"version": "7.7.0"
}
},
"meta": {
"version": 40
}
}

View File

@ -1,272 +0,0 @@
{
"data": {
"config": {},
"PreferencesController": {
"frequentRpcListDetail": [
{
"rpcUrl": "http://localhost:8545",
"chainId": "0x539",
"ticker": "ETH",
"nickname": "Localhost 8545",
"rpcPrefs": {}
}
],
"accountTokens": {
"0x0cc5261ab8ce458dc977078a3623e2badd27afd3": {
"0x539": []
},
"0x3ed0ee22e0685ebbf07b2360a8331693c413cc59": {},
"0xd38d853771fb546bd8b18b2f3638491bc0b0e906": {
"0x539": []
}
},
"accountHiddenTokens": {
"0x0cc5261ab8ce458dc977078a3623e2badd27afd3": {
"0x539": []
},
"0x3ed0ee22e0685ebbf07b2360a8331693c413cc59": {},
"0xd38d853771fb546bd8b18b2f3638491bc0b0e906": {
"0x539": []
}
},
"assetImages": {},
"tokens": [],
"hiddenTokens": [],
"suggestedTokens": {},
"useBlockie": false,
"useNonceField": false,
"usePhishDetect": true,
"featureFlags": {
"showIncomingTransactions": true
},
"knownMethodData": {},
"firstTimeFlowType": "import",
"currentLocale": "en",
"identities": {
"0x0cc5261ab8ce458dc977078a3623e2badd27afd3": {
"name": "Account 1",
"address": "0x0cc5261ab8ce458dc977078a3623e2badd27afd3",
"lastSelected": 1618940443499
},
"0x3ed0ee22e0685ebbf07b2360a8331693c413cc59": {
"name": "Account 2",
"address": "0x3ed0ee22e0685ebbf07b2360a8331693c413cc59"
},
"0xd38d853771fb546bd8b18b2f3638491bc0b0e906": {
"name": "2nd account",
"address": "0xd38d853771fb546bd8b18b2f3638491bc0b0e906",
"lastSelected": 1618940443010
}
},
"lostIdentities": {},
"forgottenPassword": false,
"preferences": {
"showFiatInTestnets": false,
"useNativeCurrencyAsPrimaryCurrency": true,
"hideZeroBalanceTokens": false
},
"completedOnboarding": true,
"ipfsGateway": "dweb.link",
"infuraBlocked": false,
"selectedAddress": "0x0cc5261ab8ce458dc977078a3623e2badd27afd3"
},
"firstTimeInfo": {
"version": "9.3.0",
"date": 1617927806790
},
"NetworkController": {
"provider": {
"ticker": "ETH",
"type": "rpc",
"rpcUrl": "http://localhost:8545",
"chainId": "0x539",
"nickname": "Localhost 8545"
},
"previousProviderStore": {
"ticker": "ETH",
"type": "rpc",
"rpcUrl": "http://localhost:8545",
"chainId": "0x539",
"nickname": "Localhost 8545"
},
"network": "1337"
},
"NotificationController": {
"notifications": {
"1": {
"isShown": true
},
"3": {
"isShown": true
},
"5": {
"isShown": true
},
"6": {
"isShown": true
},
"8": {
"isShown": true
},
"10": {
"isShown": true
},
"11": {
"isShown": true
},
"12": {
"isShown": true
},
"14": {
"isShown": true
},
"15": {
"isShown": true
}
}
},
"CurrencyController": {
"conversionDate": 1618940438.187,
"conversionRate": 2254.54,
"currentCurrency": "usd",
"nativeCurrency": "ETH",
"usdConversionRate": 2254.54
},
"CachedBalancesController": {
"cachedBalances": {
"0x539": {
"0x0cc5261ab8ce458dc977078a3623e2badd27afd3": "0x14cffbeaf5a7d3000",
"0x3ed0ee22e0685ebbf07b2360a8331693c413cc59": "0x0",
"0xd38d853771fb546bd8b18b2f3638491bc0b0e906": "0x0"
}
}
},
"MetaMetricsController": {
"participateInMetaMetrics": false,
"metaMetricsId": null
},
"PermissionsController": {
"permissionsRequests": [],
"permissionsDescriptions": {},
"domains": {}
},
"TransactionController": {
"transactions": {
"1374812123920442": {
"id": 1374812123920442,
"time": 1618940444708,
"status": "confirmed",
"metamaskNetworkId": "1337",
"chainId": "0x539",
"loadingDefaults": false,
"txParams": {
"from": "0x0cc5261ab8ce458dc977078a3623e2badd27afd3",
"to": "0x2f318c334780961fb129d2a6c30d0763d9a5c970",
"nonce": "0x0",
"value": "0xde0b6b3a7640000",
"gas": "0x5208",
"gasPrice": "0x363fe1da00"
},
"origin": "metamask",
"type": "simpleSend",
"history": [],
"nonceDetails": {
"params": {
"highestLocallyConfirmed": 0,
"highestSuggested": 0,
"nextNetworkNonce": 0
},
"local": {
"name": "local",
"nonce": 0,
"details": {
"startPoint": 0,
"highest": 0
}
},
"network": {
"name": "network",
"nonce": 0,
"details": {
"blockNumber": "0x5",
"baseCount": 0
}
}
},
"r": "0x035de1d588f67547bd9c7bb9b34a8330c10085155e42af0017986911ca922e61",
"s": "0x36c3c12a323121afe6d63bc8c5929766d385e2e7b7fc892ecd0f10a7ec4ab59e",
"v": "0x0a95",
"rawTx": "0xf86e8085363fe1da00825208942f318c334780961fb129d2a6c30d0763d9a5c970880de0b6b3a764000080820a95a0035de1d588f67547bd9c7bb9b34a8330c10085155e42af0017986911ca922e61a036c3c12a323121afe6d63bc8c5929766d385e2e7b7fc892ecd0f10a7ec4ab59e",
"hash": "0xaba403a1dff459d7549b57369cfdd323c70fc79a307ed8f9cae811ddd6883a74",
"submittedTime": 1618940445208,
"txReceipt": {
"transactionHash": "0xaba403a1dff459d7549b57369cfdd323c70fc79a307ed8f9cae811ddd6883a74",
"transactionIndex": {
"negative": 0,
"words": [0, null],
"length": 1,
"red": null
},
"blockHash": "0x734618e63369e7ea10872e68cec4d400d77c55ed525cbc295802d00d7b4bd1d2",
"blockNumber": {
"negative": 0,
"words": [6, null],
"length": 1,
"red": null
},
"from": "0x0cc5261ab8ce458dc977078a3623e2badd27afd3",
"to": "0x2f318c334780961fb129d2a6c30d0763d9a5c970",
"gasUsed": "5208",
"cumulativeGasUsed": {
"negative": 0,
"words": [21000, null],
"length": 1,
"red": null
},
"contractAddress": null,
"logs": [],
"status": "0x1",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}
}
}
},
"KeyringController": {
"vault": "{\"data\":\"Ot+BTtJPag0xubdiv1nO9bsSvTHivHCd6CD7Lxgb1McYw3VqMjgp5rPMZmblJ1lscuMxyiqp99G52uXO9S0em6F9htpa+t/wn6qubRKTTNG9fxNzQrKXRDNhdgfYckVk5VAZ4fgl2iMZcRDvS8H/+gucVKJ33Sl6mXyPofdexXhWDCU6uR2YecnfaIum9cL2u/GqOMPE3jxzy0Wip0x2Jyp3QOKhvu8A3GIjzagLOaQ7a1APdl8=\",\"iv\":\"lbsyPeGYWU6U1+jvmW9UHg==\",\"salt\":\"Zmbhpskwxe4rYfXtELBvlcvW4HISPBATRmMqzsnZPMg=\"}"
},
"AlertController": {
"alertEnabledness": {
"unconnectedAccount": true,
"web3ShimUsage": true
},
"unconnectedAccountAlertShownOrigins": {},
"web3ShimUsageOrigins": {}
},
"OnboardingController": {
"seedPhraseBackedUp": true,
"onboardingTabs": {}
},
"AddressBookController": {
"addressBook": {
"0x539": {
"0x2f318C334780961FB129D2a6c30D0763d9a5C970": {
"address": "0x2f318C334780961FB129D2a6c30D0763d9a5C970",
"chainId": "0x539",
"isEns": false,
"memo": "",
"name": ""
}
}
}
},
"AppStateController": {
"connectedStatusPopoverHasBeenShown": true,
"swapsWelcomeMessageHasBeenShown": false,
"defaultHomeActiveTabName": "Activity",
"showPortfolioTooltip": false
}
},
"meta": {
"version": 57
}
}

View File

@ -1,157 +0,0 @@
{
"data": {
"AppStateController": {
"mkrMigrationReminderTimestamp": null,
"showPortfolioTooltip": false
},
"CachedBalancesController": {
"cachedBalances": {
"4": {}
}
},
"CurrencyController": {
"conversionDate": 1575697244.188,
"conversionRate": 149.61,
"currentCurrency": "usd",
"nativeCurrency": "ETH"
},
"IncomingTransactionsController": {
"incomingTransactions": {},
"incomingTxLastFetchedBlocksByNetwork": {
"goerli": null,
"mainnet": null,
"sepolia": null
}
},
"KeyringController": {
"vault": "{\"data\":\"s6TpYjlUNsn7ifhEFTkuDGBUM1GyOlPrim7JSjtfIxgTt8/6MiXgiR/CtFfR4dWW2xhq85/NGIBYEeWrZThGdKGarBzeIqBfLFhw9n509jprzJ0zc2Rf+9HVFGLw+xxC4xPxgCS0IIWeAJQ+XtGcHmn0UZXriXm8Ja4kdlow6SWinB7sr/WM3R0+frYs4WgllkwggDf2/Tv6VHygvLnhtzp6hIJFyTjh+l/KnyJTyZW1TkZhDaNDzX3SCOHT\",\"iv\":\"FbeHDAW5afeWNORfNJBR0Q==\",\"salt\":\"TxZ+WbCW6891C9LK/hbMAoUsSEW1E8pyGLVBU6x5KR8=\"}"
},
"NetworkController": {
"network": "1337",
"provider": {
"nickname": "Localhost 8545",
"rpcUrl": "http://localhost:8545",
"chainId": "0x539",
"ticker": "ETH",
"type": "rpc"
}
},
"NotificationController": {
"notifications": {
"1": {
"isShown": true
},
"3": {
"isShown": true
},
"5": {
"isShown": true
},
"6": {
"isShown": true
},
"8": {
"isShown": true
},
"10": {
"isShown": true
},
"11": {
"isShown": true
},
"12": {
"isShown": true
},
"14": {
"isShown": true
},
"15": {
"isShown": true
}
}
},
"OnboardingController": {
"onboardingTabs": {},
"seedPhraseBackedUp": false
},
"PermissionsMetadata": {
"domainMetadata": {
"metamask.github.io": {
"icon": null,
"name": "M E T A M A S K M E S H T E S T"
}
},
"permissionsHistory": {},
"permissionsLog": [
{
"id": 746677923,
"method": "eth_accounts",
"methodType": "restricted",
"origin": "metamask.github.io",
"request": {
"id": 746677923,
"jsonrpc": "2.0",
"method": "eth_accounts",
"origin": "metamask.github.io",
"params": []
},
"requestTime": 1575697241368,
"response": {
"id": 746677923,
"jsonrpc": "2.0",
"result": []
},
"responseTime": 1575697241370,
"success": true
}
]
},
"PreferencesController": {
"accountTokens": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"goerli": [],
"sepolia": []
}
},
"assetImages": {},
"completedOnboarding": true,
"dismissSeedBackUpReminder": true,
"currentLocale": "en",
"featureFlags": {
"showIncomingTransactions": true,
"transactionTime": false
},
"firstTimeFlowType": "create",
"forgottenPassword": false,
"frequentRpcListDetail": [],
"identities": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"address": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"name": "Account 1"
}
},
"knownMethodData": {},
"lostIdentities": {},
"metaMetricsId": null,
"participateInMetaMetrics": false,
"preferences": {
"useNativeCurrencyAsPrimaryCurrency": true
},
"selectedAddress": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"suggestedTokens": {},
"tokens": [],
"useBlockie": false,
"useNonceField": false,
"usePhishDetect": true,
"useTokenDetection": true
},
"config": {},
"firstTimeInfo": {
"date": 1575697234195,
"version": "7.7.0"
}
},
"meta": {
"version": 40
}
}

View File

@ -1,156 +0,0 @@
{
"data": {
"AppStateController": {
"mkrMigrationReminderTimestamp": null,
"showPortfolioTooltip": false
},
"CachedBalancesController": {
"cachedBalances": {
"4": {}
}
},
"CurrencyController": {
"conversionDate": 1594323667.203,
"conversionRate": 14205.88,
"currentCurrency": "php",
"nativeCurrency": "ETH"
},
"IncomingTransactionsController": {
"incomingTransactions": {},
"incomingTxLastFetchedBlocksByNetwork": {
"goerli": null,
"mainnet": null,
"sepolia": null
}
},
"KeyringController": {
"vault": "{\"data\":\"s6TpYjlUNsn7ifhEFTkuDGBUM1GyOlPrim7JSjtfIxgTt8/6MiXgiR/CtFfR4dWW2xhq85/NGIBYEeWrZThGdKGarBzeIqBfLFhw9n509jprzJ0zc2Rf+9HVFGLw+xxC4xPxgCS0IIWeAJQ+XtGcHmn0UZXriXm8Ja4kdlow6SWinB7sr/WM3R0+frYs4WgllkwggDf2/Tv6VHygvLnhtzp6hIJFyTjh+l/KnyJTyZW1TkZhDaNDzX3SCOHT\",\"iv\":\"FbeHDAW5afeWNORfNJBR0Q==\",\"salt\":\"TxZ+WbCW6891C9LK/hbMAoUsSEW1E8pyGLVBU6x5KR8=\"}"
},
"NetworkController": {
"network": "1337",
"provider": {
"nickname": "Localhost 8545",
"rpcUrl": "http://localhost:8545",
"chainId": "0x539",
"ticker": "ETH",
"type": "rpc"
}
},
"NotificationController": {
"notifications": {
"1": {
"isShown": true
},
"3": {
"isShown": true
},
"5": {
"isShown": true
},
"6": {
"isShown": true
},
"8": {
"isShown": true
},
"10": {
"isShown": true
},
"11": {
"isShown": true
},
"12": {
"isShown": true
},
"14": {
"isShown": true
},
"15": {
"isShown": true
}
}
},
"OnboardingController": {
"onboardingTabs": {},
"seedPhraseBackedUp": false
},
"PermissionsMetadata": {
"domainMetadata": {
"metamask.github.io": {
"icon": null,
"name": "M E T A M A S K M E S H T E S T"
}
},
"permissionsHistory": {},
"permissionsLog": [
{
"id": 746677923,
"method": "eth_accounts",
"methodType": "restricted",
"origin": "metamask.github.io",
"request": {
"id": 746677923,
"jsonrpc": "2.0",
"method": "eth_accounts",
"origin": "metamask.github.io",
"params": []
},
"requestTime": 1575697241368,
"response": {
"id": 746677923,
"jsonrpc": "2.0",
"result": []
},
"responseTime": 1575697241370,
"success": true
}
]
},
"PreferencesController": {
"accountTokens": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"goerli": [],
"sepolia": []
}
},
"assetImages": {},
"completedOnboarding": true,
"currentLocale": "en",
"featureFlags": {
"showIncomingTransactions": true,
"transactionTime": false
},
"firstTimeFlowType": "create",
"forgottenPassword": false,
"frequentRpcListDetail": [],
"identities": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"address": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"name": "Account 1"
}
},
"knownMethodData": {},
"lostIdentities": {},
"metaMetricsId": null,
"participateInMetaMetrics": false,
"preferences": {
"showFiatInTestnets": true,
"useNativeCurrencyAsPrimaryCurrency": true
},
"selectedAddress": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"suggestedTokens": {},
"tokens": [],
"useBlockie": false,
"useNonceField": false,
"usePhishDetect": true
},
"config": {},
"firstTimeInfo": {
"date": 1575697234195,
"version": "7.7.0"
}
},
"meta": {
"version": 40
}
}

View File

@ -1,200 +0,0 @@
{
"data": {
"AppStateController": {
"connectedStatusPopoverHasBeenShown": false,
"showPortfolioTooltip": false
},
"CachedBalancesController": {
"cachedBalances": {
"4": {},
"1337": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": "0x15af1d78b58c40000"
}
}
},
"CurrencyController": {
"conversionDate": 1594348502.519,
"conversionRate": 240.09,
"currentCurrency": "usd",
"nativeCurrency": "ETH"
},
"IncomingTransactionsController": {
"incomingTransactions": {},
"incomingTxLastFetchedBlocksByNetwork": {
"goerli": null,
"mainnet": null,
"sepolia": null,
"localhost": 98
}
},
"KeyringController": {
"vault": "{\"data\":\"s6TpYjlUNsn7ifhEFTkuDGBUM1GyOlPrim7JSjtfIxgTt8/6MiXgiR/CtFfR4dWW2xhq85/NGIBYEeWrZThGdKGarBzeIqBfLFhw9n509jprzJ0zc2Rf+9HVFGLw+xxC4xPxgCS0IIWeAJQ+XtGcHmn0UZXriXm8Ja4kdlow6SWinB7sr/WM3R0+frYs4WgllkwggDf2/Tv6VHygvLnhtzp6hIJFyTjh+l/KnyJTyZW1TkZhDaNDzX3SCOHT\",\"iv\":\"FbeHDAW5afeWNORfNJBR0Q==\",\"salt\":\"TxZ+WbCW6891C9LK/hbMAoUsSEW1E8pyGLVBU6x5KR8=\"}"
},
"NetworkController": {
"provider": {
"nickname": "Localhost 8545",
"rpcUrl": "http://localhost:8545",
"chainId": "0x539",
"ticker": "ETH",
"type": "rpc"
},
"network": "1337"
},
"NotificationController": {
"notifications": {
"1": {
"isShown": true
},
"3": {
"isShown": true
},
"5": {
"isShown": true
},
"6": {
"isShown": true
},
"8": {
"isShown": true
},
"10": {
"isShown": true
},
"11": {
"isShown": true
},
"12": {
"isShown": true
},
"14": {
"isShown": true
},
"15": {
"isShown": true
}
}
},
"OnboardingController": {
"onboardingTabs": {},
"seedPhraseBackedUp": false
},
"PermissionsMetadata": {
"permissionsLog": [
{
"id": 1764280960,
"method": "eth_requestAccounts",
"methodType": "restricted",
"origin": "http://127.0.0.1:8080",
"request": {
"method": "eth_requestAccounts",
"jsonrpc": "2.0",
"id": 1764280960,
"origin": "http://127.0.0.1:8080",
"tabId": 2
},
"requestTime": 1594348329232,
"response": {
"id": 1764280960,
"jsonrpc": "2.0",
"result": ["0x5cfe73b6021e818b776b421b1c4db2474086a7e1"]
},
"responseTime": 1594348332276,
"success": true
}
],
"permissionsHistory": {
"http://127.0.0.1:8080": {
"eth_accounts": {
"accounts": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": 1594348332276
},
"lastApproved": 1594348332276
}
}
},
"domainMetadata": {
"http://127.0.0.1:8080": {
"name": "E2E Test Dapp",
"icon": "http://127.0.0.1:8080/metamask-fox.svg",
"lastUpdated": 1594348323811,
"host": "127.0.0.1:8080"
}
}
},
"PreferencesController": {
"frequentRpcListDetail": [],
"accountTokens": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"goerli": [],
"sepolia": []
}
},
"assetImages": {},
"tokens": [],
"suggestedTokens": {},
"useBlockie": false,
"useNonceField": false,
"usePhishDetect": true,
"featureFlags": {
"showIncomingTransactions": true,
"transactionTime": false
},
"knownMethodData": {},
"participateInMetaMetrics": true,
"firstTimeFlowType": "create",
"currentLocale": "en",
"identities": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"address": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"name": "Account 1"
}
},
"lostIdentities": {},
"forgottenPassword": false,
"preferences": {
"useNativeCurrencyAsPrimaryCurrency": true
},
"completedOnboarding": true,
"metaMetricsId": "fake-metrics-id",
"ipfsGateway": "dweb.link",
"selectedAddress": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1"
},
"config": {},
"firstTimeInfo": {
"date": 1575697234195,
"version": "7.7.0"
},
"PermissionsController": {
"permissionsRequests": [],
"permissionsDescriptions": {},
"domains": {
"http://127.0.0.1:8080": {
"permissions": [
{
"@context": ["https://github.com/MetaMask/rpc-cap"],
"parentCapability": "eth_accounts",
"id": "f55a1c15-ea48-4088-968e-63be474d42fa",
"date": 1594348332268,
"invoker": "http://127.0.0.1:8080",
"caveats": [
{
"type": "limitResponseLength",
"value": 1,
"name": "primaryAccountOnly"
},
{
"type": "filterResponse",
"value": ["0x5cfe73b6021e818b776b421b1c4db2474086a7e1"],
"name": "exposedAccounts"
}
]
}
]
}
}
}
},
"meta": {
"version": 47
}
}

View File

@ -1,442 +0,0 @@
{
"data": {
"AppStateController": {
"mkrMigrationReminderTimestamp": null,
"showPortfolioTooltip": false
},
"CachedBalancesController": {
"cachedBalances": {
"4": {}
}
},
"CurrencyController": {
"conversionDate": 1575697244.188,
"conversionRate": 149.61,
"currentCurrency": "usd",
"nativeCurrency": "ETH"
},
"IncomingTransactionsController": {
"incomingTransactions": {},
"incomingTxLastFetchedBlocksByNetwork": {
"goerli": null,
"mainnet": null,
"sepolia": null
}
},
"KeyringController": {
"vault": "{\"data\":\"s6TpYjlUNsn7ifhEFTkuDGBUM1GyOlPrim7JSjtfIxgTt8/6MiXgiR/CtFfR4dWW2xhq85/NGIBYEeWrZThGdKGarBzeIqBfLFhw9n509jprzJ0zc2Rf+9HVFGLw+xxC4xPxgCS0IIWeAJQ+XtGcHmn0UZXriXm8Ja4kdlow6SWinB7sr/WM3R0+frYs4WgllkwggDf2/Tv6VHygvLnhtzp6hIJFyTjh+l/KnyJTyZW1TkZhDaNDzX3SCOHT\",\"iv\":\"FbeHDAW5afeWNORfNJBR0Q==\",\"salt\":\"TxZ+WbCW6891C9LK/hbMAoUsSEW1E8pyGLVBU6x5KR8=\"}"
},
"NetworkController": {
"network": "1337",
"provider": {
"nickname": "Localhost 8545",
"rpcUrl": "http://localhost:8545",
"chainId": "0x539",
"ticker": "ETH",
"type": "rpc"
}
},
"NotificationController": {
"notifications": {
"1": {
"isShown": true
},
"3": {
"isShown": true
},
"5": {
"isShown": true
},
"6": {
"isShown": true
},
"8": {
"isShown": true
},
"10": {
"isShown": true
},
"11": {
"isShown": true
},
"12": {
"isShown": true
},
"14": {
"isShown": true
},
"15": {
"isShown": true
}
}
},
"OnboardingController": {
"onboardingTabs": {},
"seedPhraseBackedUp": false
},
"PermissionsMetadata": {
"domainMetadata": {
"metamask.github.io": {
"icon": null,
"name": "M E T A M A S K M E S H T E S T"
}
},
"permissionsHistory": {},
"permissionsLog": [
{
"id": 746677923,
"method": "eth_accounts",
"methodType": "restricted",
"origin": "metamask.github.io",
"request": {
"id": 746677923,
"jsonrpc": "2.0",
"method": "eth_accounts",
"origin": "metamask.github.io",
"params": []
},
"requestTime": 1575697241368,
"response": {
"id": 746677923,
"jsonrpc": "2.0",
"result": []
},
"responseTime": 1575697241370,
"success": true
}
]
},
"PreferencesController": {
"accountTokens": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"goerli": [],
"sepolia": []
}
},
"assetImages": {},
"completedOnboarding": true,
"dismissSeedBackUpReminder": true,
"currentLocale": "en",
"featureFlags": {
"showIncomingTransactions": true,
"transactionTime": false
},
"firstTimeFlowType": "create",
"forgottenPassword": false,
"frequentRpcListDetail": [],
"identities": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"address": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"name": "Account 1"
}
},
"knownMethodData": {},
"lostIdentities": {},
"metaMetricsId": null,
"participateInMetaMetrics": false,
"preferences": {
"useNativeCurrencyAsPrimaryCurrency": true
},
"selectedAddress": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"suggestedTokens": {},
"tokens": [],
"useBlockie": false,
"useNonceField": false,
"usePhishDetect": true,
"useTokenDetection": true
},
"MetaMetricsController": {
"fragments": {
"transaction-added-7911313280012623": {
"category": "Transactions",
"initialEvent": "Transaction Added",
"successEvent": "Transaction Approved",
"failureEvent": "Transaction Rejected",
"properties": {},
"persist": true,
"uniqueIdentifier": "transaction-added-7911313280012623"
},
"transaction-added-7911313280012624": {
"category": "Transactions",
"initialEvent": "Transaction Added",
"successEvent": "Transaction Approved",
"failureEvent": "Transaction Rejected",
"properties": {},
"persist": true,
"uniqueIdentifier": "transaction-added-7911313280012624"
},
"transaction-added-7911313280012625": {
"category": "Transactions",
"initialEvent": "Transaction Added",
"successEvent": "Transaction Approved",
"failureEvent": "Transaction Rejected",
"properties": {},
"persist": true,
"uniqueIdentifier": "transaction-added-7911313280012625"
},
"transaction-added-7911313280012626": {
"category": "Transactions",
"initialEvent": "Transaction Added",
"successEvent": "Transaction Approved",
"failureEvent": "Transaction Rejected",
"properties": {},
"persist": true,
"uniqueIdentifier": "transaction-added-7911313280012626"
}
}
},
"TransactionController": {
"transactions": {
"7911313280012623": {
"chainId": "0x539",
"dappSuggestedGasFees": {
"gas": "0x5208",
"gasPrice": "0x4a817c800"
},
"history": [
{
"chainId": "0x539",
"dappSuggestedGasFees": {
"gas": "0x5208",
"gasPrice": "0x4a817c800"
},
"id": 7911313280012623,
"loadingDefaults": true,
"metamaskNetworkId": "1337",
"origin": "https://metamask.github.io",
"status": "unapproved",
"time": 1631545991949,
"txParams": {
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"gas": "0x5208",
"gasPrice": "0x4a817c800",
"to": "0x2f318c334780961fb129d2a6c30d0763d9a5c970",
"value": "0x29a2241af62c0000"
},
"type": "sentEther"
},
[
{
"note": "Added new unapproved transaction.",
"op": "replace",
"path": "/loadingDefaults",
"timestamp": 1631545992244,
"value": false
}
]
],
"id": 7911313280012623,
"loadingDefaults": false,
"metamaskNetworkId": "1337",
"origin": "https://metamask.github.io",
"status": "unapproved",
"time": 1631545991949,
"txParams": {
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"gas": "0x5208",
"gasPrice": "0x4a817c800",
"to": "0x2f318c334780961fb129d2a6c30d0763d9a5c970",
"value": "0x29a2241af62c0000"
},
"type": "sentEther"
},
"7911313280012624": {
"chainId": "0x539",
"dappSuggestedGasFees": {
"gas": "0x5208",
"gasPrice": "0x4a817c800"
},
"history": [
{
"chainId": "0x539",
"dappSuggestedGasFees": {
"gas": "0x5208",
"gasPrice": "0x4a817c800"
},
"id": 7911313280012624,
"loadingDefaults": true,
"metamaskNetworkId": "1337",
"origin": "https://metamask.github.io",
"status": "unapproved",
"time": 1631545994578,
"txParams": {
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"gas": "0x5208",
"gasPrice": "0x4a817c800",
"to": "0x2f318c334780961fb129d2a6c30d0763d9a5c970",
"value": "0x29a2241af62c0000"
},
"type": "sentEther"
},
[
{
"note": "Added new unapproved transaction.",
"op": "replace",
"path": "/loadingDefaults",
"timestamp": 1631545994695,
"value": false
}
]
],
"id": 7911313280012624,
"loadingDefaults": false,
"metamaskNetworkId": "1337",
"origin": "https://metamask.github.io",
"status": "unapproved",
"time": 1631545994578,
"txParams": {
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"gas": "0x5208",
"gasPrice": "0x4a817c800",
"to": "0x2f318c334780961fb129d2a6c30d0763d9a5c970",
"value": "0x29a2241af62c0000"
},
"type": "sentEther"
},
"7911313280012625": {
"chainId": "0x539",
"dappSuggestedGasFees": {
"gas": "0x5208",
"gasPrice": "0x4a817c800"
},
"history": [
{
"chainId": "0x539",
"dappSuggestedGasFees": {
"gas": "0x5208",
"gasPrice": "0x4a817c800"
},
"id": 7911313280012625,
"loadingDefaults": true,
"metamaskNetworkId": "1337",
"origin": "https://metamask.github.io",
"status": "unapproved",
"time": 1631545996673,
"txParams": {
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"gas": "0x5208",
"gasPrice": "0x4a817c800",
"to": "0x2f318c334780961fb129d2a6c30d0763d9a5c970",
"value": "0x29a2241af62c0000"
},
"type": "sentEther"
},
[
{
"note": "Added new unapproved transaction.",
"op": "replace",
"path": "/loadingDefaults",
"timestamp": 1631545996678,
"value": false
}
]
],
"id": 7911313280012625,
"loadingDefaults": false,
"metamaskNetworkId": "1337",
"origin": "https://metamask.github.io",
"status": "unapproved",
"time": 1631545996673,
"txParams": {
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"gas": "0x5208",
"gasPrice": "0x4a817c800",
"to": "0x2f318c334780961fb129d2a6c30d0763d9a5c970",
"value": "0x29a2241af62c0000"
},
"type": "sentEther"
},
"7911313280012626": {
"chainId": "0x539",
"dappSuggestedGasFees": {
"gas": "0x5208",
"gasPrice": "0x4a817c800"
},
"history": [
{
"chainId": "0x539",
"dappSuggestedGasFees": {
"gas": "0x5208",
"gasPrice": "0x4a817c800"
},
"id": 7911313280012626,
"loadingDefaults": true,
"metamaskNetworkId": "1337",
"origin": "https://metamask.github.io",
"status": "unapproved",
"time": 1631545998675,
"txParams": {
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"gas": "0x5208",
"gasPrice": "0x4a817c800",
"to": "0x2f318c334780961fb129d2a6c30d0763d9a5c970",
"value": "0x29a2241af62c0000"
},
"type": "sentEther"
},
[
{
"note": "Added new unapproved transaction.",
"op": "replace",
"path": "/loadingDefaults",
"timestamp": 1631545998677,
"value": false
}
]
],
"id": 7911313280012626,
"loadingDefaults": false,
"metamaskNetworkId": "1337",
"origin": "https://metamask.github.io",
"status": "unapproved",
"time": 1631545998675,
"txParams": {
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"gas": "0x5208",
"gasPrice": "0x4a817c800",
"to": "0x2f318c334780961fb129d2a6c30d0763d9a5c970",
"value": "0x29a2241af62c0000"
},
"type": "sentEther"
}
}
},
"PermissionsController": {
"permissionsRequests": [],
"permissionsDescriptions": {},
"domains": {
"http://127.0.0.1:8080": {
"permissions": [
{
"@context": ["https://github.com/MetaMask/rpc-cap"],
"parentCapability": "eth_accounts",
"id": "f55a1c15-ea48-4088-968e-63be474d42fa",
"date": 1594348332268,
"invoker": "http://127.0.0.1:8080",
"caveats": [
{
"type": "limitResponseLength",
"value": 1,
"name": "primaryAccountOnly"
},
{
"type": "filterResponse",
"value": ["0x5cfe73b6021e818b776b421b1c4db2474086a7e1"],
"name": "exposedAccounts"
}
]
}
]
}
}
},
"config": {},
"firstTimeInfo": {
"date": 1575697234195,
"version": "7.7.0"
}
},
"meta": {
"version": 40
}
}

View File

@ -1,59 +0,0 @@
{
"data": {
"config": {},
"PreferencesController": {
"frequentRpcListDetail": [
{
"rpcUrl": "http://localhost:8545",
"chainId": "0x539",
"ticker": "ETH",
"nickname": "Localhost 8545",
"rpcPrefs": {}
}
]
},
"firstTimeInfo": {
"version": "9.3.0",
"date": 1617927806790
},
"NetworkController": {
"provider": {
"ticker": "ETH",
"type": "rpc",
"rpcUrl": "http://localhost:8545",
"chainId": "0x539",
"nickname": "Localhost 8545"
},
"network": "1337"
},
"NotificationController": {
"notifications": {
"10": {
"isShown": true
},
"11": {
"isShown": true
},
"12": {
"isShown": true
},
"14": {
"isShown": true
},
"15": {
"isShown": true
}
}
},
"CurrencyController": {
"conversionDate": 1617927806.941,
"conversionRate": 2084.64,
"currentCurrency": "usd",
"nativeCurrency": "ETH",
"usdConversionRate": 2084.64
}
},
"meta": {
"version": 57
}
}

View File

@ -1,229 +0,0 @@
{
"data": {
"AppStateController": {
"mkrMigrationReminderTimestamp": null,
"swapsWelcomeMessageHasBeenShown": true,
"showPortfolioTooltip": false
},
"CachedBalancesController": {
"cachedBalances": {
"4": {}
}
},
"CurrencyController": {
"conversionDate": 1575697244.188,
"conversionRate": 149.61,
"currentCurrency": "usd",
"nativeCurrency": "ETH"
},
"IncomingTransactionsController": {
"incomingTransactions": {},
"incomingTxLastFetchedBlocksByNetwork": {
"goerli": null,
"mainnet": null,
"sepolia": null
}
},
"KeyringController": {
"vault": "{\"data\":\"s6TpYjlUNsn7ifhEFTkuDGBUM1GyOlPrim7JSjtfIxgTt8/6MiXgiR/CtFfR4dWW2xhq85/NGIBYEeWrZThGdKGarBzeIqBfLFhw9n509jprzJ0zc2Rf+9HVFGLw+xxC4xPxgCS0IIWeAJQ+XtGcHmn0UZXriXm8Ja4kdlow6SWinB7sr/WM3R0+frYs4WgllkwggDf2/Tv6VHygvLnhtzp6hIJFyTjh+l/KnyJTyZW1TkZhDaNDzX3SCOHT\",\"iv\":\"FbeHDAW5afeWNORfNJBR0Q==\",\"salt\":\"TxZ+WbCW6891C9LK/hbMAoUsSEW1E8pyGLVBU6x5KR8=\"}"
},
"NetworkController": {
"network": "1337",
"provider": {
"nickname": "Localhost 8545",
"rpcUrl": "http://localhost:8545",
"chainId": "0x539",
"ticker": "ETH",
"type": "rpc"
}
},
"NotificationController": {
"notifications": {
"1": {
"isShown": true
},
"3": {
"isShown": true
},
"5": {
"isShown": true
},
"6": {
"isShown": true
},
"8": {
"isShown": true
},
"10": {
"isShown": true
},
"11": {
"isShown": true
},
"12": {
"isShown": true
},
"14": {
"isShown": true
},
"15": {
"isShown": true
}
}
},
"OnboardingController": {
"onboardingTabs": {},
"seedPhraseBackedUp": false
},
"PermissionsMetadata": {
"domainMetadata": {
"metamask.github.io": {
"icon": null,
"name": "M E T A M A S K M E S H T E S T"
}
},
"permissionsHistory": {},
"permissionsLog": [
{
"id": 746677923,
"method": "eth_accounts",
"methodType": "restricted",
"origin": "metamask.github.io",
"request": {
"id": 746677923,
"jsonrpc": "2.0",
"method": "eth_accounts",
"origin": "metamask.github.io",
"params": []
},
"requestTime": 1575697241368,
"response": {
"id": 746677923,
"jsonrpc": "2.0",
"result": []
},
"responseTime": 1575697241370,
"success": true
}
]
},
"PreferencesController": {
"accountTokens": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"goerli": [],
"sepolia": []
}
},
"assetImages": {},
"completedOnboarding": true,
"eip1559V2Enabled": true,
"currentLocale": "en",
"featureFlags": {
"showIncomingTransactions": true,
"transactionTime": false
},
"firstTimeFlowType": "create",
"forgottenPassword": false,
"frequentRpcListDetail": [],
"identities": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"address": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"name": "Account 1"
}
},
"knownMethodData": {},
"lostIdentities": {},
"metaMetricsId": null,
"participateInMetaMetrics": false,
"preferences": {
"useNativeCurrencyAsPrimaryCurrency": true
},
"selectedAddress": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"suggestedTokens": {},
"tokens": [],
"useBlockie": false,
"useNonceField": false,
"usePhishDetect": true
},
"TransactionController": {
"transactions": {
"4046084157914634": {
"chainId": "0x539",
"primaryTransaction": {
"chainId": "0x539",
"id": 4046084157914634,
"loadingDefaults": true,
"metamaskNetworkId": "1337",
"origin": "metamask",
"status": "unapproved",
"time": 1617228030067,
"txParams": {
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"gas": "0x61a8",
"maxFeePerGas": "0x59682f0c",
"maxPriorityFeePerGas": "0x59682f00",
"type": "0x2",
"to": "0x2f318C334780961FB129D2a6c30D0763d9a5C970",
"value": "0xde0b6b3a7640000"
},
"type": "sentEther"
},
"history": [
{
"chainId": "0x539",
"id": 4046084157914634,
"loadingDefaults": true,
"metamaskNetworkId": "1337",
"origin": "metamask",
"status": "unapproved",
"time": 1617228030067,
"txParams": {
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"gas": "0x61a8",
"maxFeePerGas": "0x59682f0c",
"maxPriorityFeePerGas": "0x59682f00",
"type": "0x2",
"to": "0x2f318C334780961FB129D2a6c30D0763d9a5C970",
"value": "0xde0b6b3a7640000"
},
"type": "simpleSend"
},
[
{
"note": "Added new unapproved transaction.",
"op": "replace",
"path": "/loadingDefaults",
"timestamp": 1617228030069,
"value": false
}
]
],
"id": 4046084157914634,
"loadingDefaults": false,
"metamaskNetworkId": "1337",
"origin": "metamask",
"status": "unapproved",
"time": 1617228030067,
"txParams": {
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"gas": "0x61a8",
"maxFeePerGas": "0x59682f0c",
"maxPriorityFeePerGas": "0x59682f00",
"type": "0x2",
"to": "0x2f318C334780961FB129D2a6c30D0763d9a5C970",
"value": "0xde0b6b3a7640000"
},
"type": "simpleSend"
}
}
},
"config": {},
"firstTimeInfo": {
"date": 1575697234195,
"version": "7.7.0"
}
},
"meta": {
"version": 40
}
}

View File

@ -1,235 +0,0 @@
{
"data": {
"AppStateController": {
"mkrMigrationReminderTimestamp": null,
"swapsWelcomeMessageHasBeenShown": true,
"showPortfolioTooltip": false
},
"CachedBalancesController": {
"cachedBalances": {
"4": {}
}
},
"CurrencyController": {
"conversionDate": 1575697244.188,
"conversionRate": 149.61,
"currentCurrency": "usd",
"nativeCurrency": "ETH"
},
"IncomingTransactionsController": {
"incomingTransactions": {},
"incomingTxLastFetchedBlocksByNetwork": {
"goerli": null,
"mainnet": null,
"sepolia": null
}
},
"KeyringController": {
"vault": "{\"data\":\"s6TpYjlUNsn7ifhEFTkuDGBUM1GyOlPrim7JSjtfIxgTt8/6MiXgiR/CtFfR4dWW2xhq85/NGIBYEeWrZThGdKGarBzeIqBfLFhw9n509jprzJ0zc2Rf+9HVFGLw+xxC4xPxgCS0IIWeAJQ+XtGcHmn0UZXriXm8Ja4kdlow6SWinB7sr/WM3R0+frYs4WgllkwggDf2/Tv6VHygvLnhtzp6hIJFyTjh+l/KnyJTyZW1TkZhDaNDzX3SCOHT\",\"iv\":\"FbeHDAW5afeWNORfNJBR0Q==\",\"salt\":\"TxZ+WbCW6891C9LK/hbMAoUsSEW1E8pyGLVBU6x5KR8=\"}"
},
"NetworkController": {
"network": "1337",
"provider": {
"nickname": "Localhost 8545",
"rpcUrl": "http://localhost:8545",
"chainId": "0x539",
"ticker": "ETH",
"type": "rpc"
}
},
"NotificationController": {
"notifications": {
"1": {
"isShown": true
},
"3": {
"isShown": true
},
"5": {
"isShown": true
},
"6": {
"isShown": true
},
"8": {
"isShown": true
},
"10": {
"isShown": true
},
"11": {
"isShown": true
},
"12": {
"isShown": true
},
"14": {
"isShown": true
},
"15": {
"isShown": true
}
}
},
"OnboardingController": {
"onboardingTabs": {},
"seedPhraseBackedUp": false
},
"PermissionsMetadata": {
"domainMetadata": {
"metamask.github.io": {
"icon": null,
"name": "M E T A M A S K M E S H T E S T"
}
},
"permissionsHistory": {},
"permissionsLog": [
{
"id": 746677923,
"method": "eth_accounts",
"methodType": "restricted",
"origin": "metamask.github.io",
"request": {
"id": 746677923,
"jsonrpc": "2.0",
"method": "eth_accounts",
"origin": "metamask.github.io",
"params": []
},
"requestTime": 1575697241368,
"response": {
"id": 746677923,
"jsonrpc": "2.0",
"result": []
},
"responseTime": 1575697241370,
"success": true
}
]
},
"PreferencesController": {
"accountTokens": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"goerli": [],
"sepolia": []
}
},
"assetImages": {},
"completedOnboarding": true,
"currentLocale": "en",
"featureFlags": {
"showIncomingTransactions": true,
"transactionTime": false
},
"firstTimeFlowType": "create",
"forgottenPassword": false,
"frequentRpcListDetail": [],
"identities": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"address": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"name": "Account 1"
}
},
"knownMethodData": {},
"lostIdentities": {},
"metaMetricsId": null,
"participateInMetaMetrics": false,
"preferences": {
"useNativeCurrencyAsPrimaryCurrency": true
},
"selectedAddress": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"suggestedTokens": {},
"tokens": [],
"useBlockie": false,
"useNonceField": false,
"usePhishDetect": true
},
"MetaMetricsController": {
"fragments": {
"transaction-added-4046084157914634": {
"category": "Transactions",
"initialEvent": "Transaction Added",
"successEvent": "Transaction Approved",
"failureEvent": "Transaction Rejected",
"properties": {},
"persist": true,
"uniqueIdentifier": "transaction-added-4046084157914634"
}
}
},
"TransactionController": {
"transactions": {
"4046084157914634": {
"chainId": "0x539",
"primaryTransaction": {
"chainId": "0x539",
"id": 4046084157914634,
"loadingDefaults": true,
"metamaskNetworkId": "1337",
"origin": "metamask",
"status": "unapproved",
"time": 1617228030067,
"txParams": {
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"gas": "0x61a8",
"gasPrice": "0x2540be400",
"to": "0x2f318C334780961FB129D2a6c30D0763d9a5C970",
"value": "0xde0b6b3a7640000"
},
"type": "sentEther"
},
"history": [
{
"chainId": "0x539",
"id": 4046084157914634,
"loadingDefaults": true,
"metamaskNetworkId": "1337",
"origin": "metamask",
"status": "unapproved",
"time": 1617228030067,
"txParams": {
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"gas": "0x61a8",
"gasPrice": "0x2540be400",
"to": "0x2f318C334780961FB129D2a6c30D0763d9a5C970",
"value": "0xde0b6b3a7640000"
},
"type": "simpleSend"
},
[
{
"note": "Added new unapproved transaction.",
"op": "replace",
"path": "/loadingDefaults",
"timestamp": 1617228030069,
"value": false
}
]
],
"id": 4046084157914634,
"loadingDefaults": false,
"metamaskNetworkId": "1337",
"origin": "metamask",
"status": "unapproved",
"time": 1617228030067,
"txParams": {
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"gas": "0x61a8",
"gasPrice": "0x2540be400",
"to": "0x2f318C334780961FB129D2a6c30D0763d9a5C970",
"value": "0xde0b6b3a7640000"
},
"type": "simpleSend"
}
}
},
"config": {},
"firstTimeInfo": {
"date": 1575697234195,
"version": "7.7.0"
}
},
"meta": {
"version": 40
}
}

View File

@ -1,158 +0,0 @@
{
"data": {
"AppStateController": {
"mkrMigrationReminderTimestamp": null,
"showPortfolioTooltip": false
},
"CachedBalancesController": {
"cachedBalances": {
"4": {}
}
},
"CurrencyController": {
"conversionDate": 1575697244.188,
"conversionRate": 149.61,
"currentCurrency": "usd",
"nativeCurrency": "ETH"
},
"IncomingTransactionsController": {
"incomingTransactions": {},
"incomingTxLastFetchedBlocksByNetwork": {
"goerli": null,
"mainnet": null,
"sepolia": null
}
},
"KeyringController": {
"vault": "{\"data\":\"s6TpYjlUNsn7ifhEFTkuDGBUM1GyOlPrim7JSjtfIxgTt8/6MiXgiR/CtFfR4dWW2xhq85/NGIBYEeWrZThGdKGarBzeIqBfLFhw9n509jprzJ0zc2Rf+9HVFGLw+xxC4xPxgCS0IIWeAJQ+XtGcHmn0UZXriXm8Ja4kdlow6SWinB7sr/WM3R0+frYs4WgllkwggDf2/Tv6VHygvLnhtzp6hIJFyTjh+l/KnyJTyZW1TkZhDaNDzX3SCOHT\",\"iv\":\"FbeHDAW5afeWNORfNJBR0Q==\",\"salt\":\"TxZ+WbCW6891C9LK/hbMAoUsSEW1E8pyGLVBU6x5KR8=\"}"
},
"NetworkController": {
"network": "1337",
"provider": {
"nickname": "Localhost 8545",
"rpcUrl": "http://localhost:8545",
"chainId": "0x539",
"ticker": "ETH",
"type": "rpc"
}
},
"NotificationController": {
"notifications": {
"1": {
"isShown": true
},
"3": {
"isShown": true
},
"5": {
"isShown": true
},
"6": {
"isShown": true
},
"8": {
"isShown": true
},
"10": {
"isShown": true
},
"11": {
"isShown": true
},
"12": {
"isShown": true
},
"14": {
"isShown": true
},
"15": {
"isShown": true
}
}
},
"OnboardingController": {
"onboardingTabs": {},
"seedPhraseBackedUp": false
},
"PermissionsMetadata": {
"domainMetadata": {
"metamask.github.io": {
"icon": null,
"name": "M E T A M A S K M E S H T E S T"
}
},
"permissionsHistory": {},
"permissionsLog": [
{
"id": 746677923,
"method": "eth_accounts",
"methodType": "restricted",
"origin": "metamask.github.io",
"request": {
"id": 746677923,
"jsonrpc": "2.0",
"method": "eth_accounts",
"origin": "metamask.github.io",
"params": []
},
"requestTime": 1575697241368,
"response": {
"id": 746677923,
"jsonrpc": "2.0",
"result": []
},
"responseTime": 1575697241370,
"success": true
}
]
},
"PreferencesController": {
"accountTokens": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"goerli": [],
"sepolia": []
}
},
"assetImages": {},
"completedOnboarding": true,
"dismissSeedBackUpReminder": true,
"currentLocale": "en",
"featureFlags": {
"showIncomingTransactions": true,
"transactionTime": false,
"sendHexData": true
},
"firstTimeFlowType": "create",
"forgottenPassword": false,
"frequentRpcListDetail": [],
"identities": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"address": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"name": "Account 1"
}
},
"knownMethodData": {},
"lostIdentities": {},
"metaMetricsId": null,
"participateInMetaMetrics": false,
"preferences": {
"useNativeCurrencyAsPrimaryCurrency": true
},
"selectedAddress": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"suggestedTokens": {},
"tokens": [],
"useBlockie": false,
"useNonceField": false,
"usePhishDetect": true,
"useTokenDetection": false
},
"config": {},
"firstTimeInfo": {
"date": 1575697234195,
"version": "7.7.0"
}
},
"meta": {
"version": 40
}
}

View File

@ -1,155 +0,0 @@
{
"data": {
"AppStateController": {
"swapsWelcomeMessageHasBeenShown": true,
"connectedStatusPopoverHasBeenShown": false,
"showPortfolioTooltip": false
},
"CachedBalancesController": {
"cachedBalances": {
"0x539": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": "0x15af1d78b58c40000"
}
}
},
"CurrencyController": {
"conversionDate": 1617897791.928,
"conversionRate": 2072.49,
"currentCurrency": "usd",
"nativeCurrency": "ETH",
"usdConversionRate": 2072.49
},
"IncomingTransactionsController": {
"incomingTransactions": {},
"incomingTxLastFetchedBlockByChainId": {
"0xaa36a7": null,
"0x1": null,
"0x5": 5570536
}
},
"KeyringController": {
"vault": "{\"data\":\"s6TpYjlUNsn7ifhEFTkuDGBUM1GyOlPrim7JSjtfIxgTt8/6MiXgiR/CtFfR4dWW2xhq85/NGIBYEeWrZThGdKGarBzeIqBfLFhw9n509jprzJ0zc2Rf+9HVFGLw+xxC4xPxgCS0IIWeAJQ+XtGcHmn0UZXriXm8Ja4kdlow6SWinB7sr/WM3R0+frYs4WgllkwggDf2/Tv6VHygvLnhtzp6hIJFyTjh+l/KnyJTyZW1TkZhDaNDzX3SCOHT\",\"iv\":\"FbeHDAW5afeWNORfNJBR0Q==\",\"salt\":\"TxZ+WbCW6891C9LK/hbMAoUsSEW1E8pyGLVBU6x5KR8=\"}"
},
"NetworkController": {
"provider": {
"nickname": "Localhost 8545",
"rpcUrl": "http://localhost:8545",
"chainId": "0x539",
"ticker": "ETH",
"type": "rpc"
},
"previousProviderStore": {
"nickname": "Localhost 8545",
"rpcUrl": "http://localhost:8545",
"chainId": "0x539",
"ticker": "ETH",
"type": "rpc"
},
"network": "1337"
},
"NotificationController": {
"notifications": {
"1": {
"isShown": true
},
"3": {
"isShown": true
},
"5": {
"isShown": true
},
"6": {
"isShown": true
},
"8": {
"isShown": true
},
"10": {
"isShown": true
},
"11": {
"isShown": true
},
"12": {
"isShown": true
},
"14": {
"isShown": true
},
"15": {
"isShown": true
}
}
},
"OnboardingController": {
"onboardingTabs": {},
"seedPhraseBackedUp": true
},
"PreferencesController": {
"frequentRpcListDetail": [
{
"rpcUrl": "http://localhost:8545",
"chainId": "0x539",
"ticker": "ETH",
"nickname": "Localhost 8545",
"rpcPrefs": {}
}
],
"accountTokens": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"0x5": [],
"0xaa36a7": []
}
},
"accountHiddenTokens": {},
"assetImages": {},
"tokens": [],
"hiddenTokens": [],
"suggestedTokens": {},
"useBlockie": true,
"useNonceField": false,
"usePhishDetect": true,
"featureFlags": {
"showIncomingTransactions": true,
"transactionTime": false
},
"knownMethodData": {},
"firstTimeFlowType": "create",
"currentLocale": "en",
"identities": {
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": {
"address": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1",
"name": "Account 1"
}
},
"lostIdentities": {},
"forgottenPassword": false,
"preferences": {
"useNativeCurrencyAsPrimaryCurrency": true
},
"completedOnboarding": true,
"ipfsGateway": "dweb.link",
"selectedAddress": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1"
},
"config": {},
"firstTimeInfo": {
"date": 1575697234195,
"version": "7.7.0"
},
"MetaMetricsController": {
"metaMetricsId": null,
"participateInMetaMetrics": false
},
"ThreeBoxController": {
"threeBoxSyncingAllowed": true,
"showRestorePrompt": true,
"threeBoxLastUpdated": 0,
"threeBoxAddress": "0x64480aa2768ef12f3f19c5a01206ceb0f82d06b9",
"threeBoxSynced": true,
"threeBoxDisabled": false
}
},
"meta": {
"version": 57
}
}

View File

@ -73,7 +73,7 @@ async function withFixtures(options, testSuite) {
});
}
await fixtureServer.start();
await fixtureServer.loadState(path.join(__dirname, 'fixtures', fixtures));
fixtureServer.loadJsonState(fixtures);
await phishingPageServer.start();
if (dapp) {
if (dappOptions?.numberOfDapps) {
@ -198,26 +198,6 @@ const getWindowHandles = async (driver, handlesCount) => {
return { extension, dapp, popup };
};
const connectDappWithExtensionPopup = async (driver) => {
await driver.openNewPage(`http://127.0.0.1:${dappBasePort}/`);
await driver.delay(regularDelayMs);
await driver.clickElement({ text: 'Connect', tag: 'button' });
await driver.delay(regularDelayMs);
const windowHandles = await getWindowHandles(driver, 3);
// open extension popup and confirm connect
await driver.switchToWindow(windowHandles.popup);
await driver.delay(largeDelayMs);
await driver.clickElement({ text: 'Next', tag: 'button' });
await driver.clickElement({ text: 'Connect', tag: 'button' });
// send from dapp
await driver.waitUntilXWindowHandles(2);
await driver.switchToWindow(windowHandles.dapp);
await driver.delay(regularDelayMs);
};
const completeImportSRPOnboardingFlow = async (
driver,
seedPhrase,
@ -333,7 +313,6 @@ module.exports = {
largeDelayMs,
veryLargeDelayMs,
withFixtures,
connectDappWithExtensionPopup,
completeImportSRPOnboardingFlow,
completeImportSRPOnboardingFlowWordByWord,
createDownloadFolder,

View File

@ -7,11 +7,14 @@ const yargs = require('yargs/yargs');
const { hideBin } = require('yargs/helpers');
const { exitWithError } = require('../../development/lib/exit-with-error');
const { withFixtures, tinyDelayMs } = require('./helpers');
const FixtureBuilder = require('./fixture-builder');
async function measurePage() {
let metrics;
try {
await withFixtures({ fixtures: 'imported-account' }, async ({ driver }) => {
await withFixtures(
{ fixtures: new FixtureBuilder().build() },
async ({ driver }) => {
await driver.delay(tinyDelayMs);
await driver.navigate();
await driver.findElement('#password');
@ -41,7 +44,8 @@ async function measurePage() {
});
metrics = parsedLogs.map((pl) => JSON.parse(pl));
});
},
);
} catch (error) {
// do nothing
}

View File

@ -12,6 +12,7 @@ const {
getFirstParentDirectoryThatExists,
} = require('../../helpers/file');
const { withFixtures, tinyDelayMs } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
/**
* The e2e test case is used to capture load and initialisation time statistics for extension in MV3 environment.
@ -20,7 +21,9 @@ const { withFixtures, tinyDelayMs } = require('../helpers');
async function profilePageLoad() {
const parsedLogs = {};
try {
await withFixtures({ fixtures: 'imported-account' }, async ({ driver }) => {
await withFixtures(
{ fixtures: new FixtureBuilder().build() },
async ({ driver }) => {
await driver.delay(tinyDelayMs);
await driver.navigate();
await driver.delay(1000);
@ -55,7 +58,8 @@ async function profilePageLoad() {
logType = 'loadTime';
}
});
});
},
);
} catch (error) {
console.log('Error in trying to parse logs.');
}

View File

@ -12,6 +12,7 @@ const {
getFirstParentDirectoryThatExists,
} = require('../helpers/file');
const { withFixtures, tinyDelayMs } = require('./helpers');
const FixtureBuilder = require('./fixture-builder');
/**
* The e2e test case is used to capture load and initialisation time statistics for extension in MV3 environment.
@ -20,7 +21,9 @@ const { withFixtures, tinyDelayMs } = require('./helpers');
async function profilePageLoad() {
const parsedLogs = {};
try {
await withFixtures({ fixtures: 'imported-account' }, async ({ driver }) => {
await withFixtures(
{ fixtures: new FixtureBuilder().build() },
async ({ driver }) => {
await driver.delay(tinyDelayMs);
await driver.navigate();
await driver.delay(1000);
@ -55,7 +58,8 @@ async function profilePageLoad() {
logType = 'loadTime';
}
});
});
},
);
} catch (error) {
console.log('Error in trying to parse logs.');
}

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
const { TEST_SNAPS_WEBSITE_URL } = require('./enums');
describe('Test Snap bip-32', function () {
@ -14,7 +15,9 @@ describe('Test Snap bip-32', function () {
};
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToSnapDapp()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -36,26 +39,9 @@ describe('Test Snap bip-32', function () {
await driver.fill('#snapId6', 'npm:@metamask/test-snap-bip32');
await driver.clickElement('#connectBip32');
// switch to metamask extension and click connect
await driver.waitUntilXWindowHandles(2, 5000, 10000);
let windowHandles = await driver.getAllWindowHandles();
await driver.switchToWindowWithTitle(
'MetaMask Notification',
windowHandles,
);
await driver.clickElement(
{
text: 'Connect',
tag: 'button',
},
10000,
);
await driver.delay(2000);
// approve install of snap
await driver.waitUntilXWindowHandles(2, 5000, 10000);
windowHandles = await driver.getAllWindowHandles();
let windowHandles = await driver.getAllWindowHandles();
await driver.switchToWindowWithTitle(
'MetaMask Notification',
windowHandles,

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
const { TEST_SNAPS_WEBSITE_URL } = require('./enums');
describe('Test Snap bip-44', function () {
@ -15,7 +16,9 @@ describe('Test Snap bip-44', function () {
};
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToSnapDapp()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -38,26 +41,9 @@ describe('Test Snap bip-44', function () {
// connect the snap
await driver.clickElement('#connectBip44');
// switch to metamask extension and click connect
await driver.waitUntilXWindowHandles(2, 5000, 10000);
let windowHandles = await driver.getAllWindowHandles();
await driver.switchToWindowWithTitle(
'MetaMask Notification',
windowHandles,
);
await driver.clickElement(
{
text: 'Connect',
tag: 'button',
},
10000,
);
await driver.delay(2000);
// approve install of snap
await driver.waitUntilXWindowHandles(2, 5000, 10000);
windowHandles = await driver.getAllWindowHandles();
let windowHandles = await driver.getAllWindowHandles();
await driver.switchToWindowWithTitle(
'MetaMask Notification',
windowHandles,

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
const { TEST_SNAPS_WEBSITE_URL } = require('./enums');
describe('Test Snap Confirm', function () {
@ -15,7 +16,9 @@ describe('Test Snap Confirm', function () {
};
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToSnapDapp()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -31,26 +34,9 @@ describe('Test Snap Confirm', function () {
await driver.fill('#snapId1', 'npm:@metamask/test-snap-confirm');
await driver.clickElement('#connectHello');
// switch to metamask extension and click connect
await driver.waitUntilXWindowHandles(2, 5000, 10000);
let windowHandles = await driver.getAllWindowHandles();
await driver.switchToWindowWithTitle(
'MetaMask Notification',
windowHandles,
);
await driver.clickElement(
{
text: 'Connect',
tag: 'button',
},
10000,
);
await driver.delay(2000);
// approve install of snap
await driver.waitUntilXWindowHandles(2, 5000, 10000);
windowHandles = await driver.getAllWindowHandles();
let windowHandles = await driver.getAllWindowHandles();
await driver.switchToWindowWithTitle(
'MetaMask Notification',
windowHandles,

View File

@ -1,6 +1,7 @@
const { strict: assert } = require('assert');
const { withFixtures } = require('../helpers');
const { PAGES } = require('../webdriver/driver');
const FixtureBuilder = require('../fixture-builder');
const { TEST_SNAPS_WEBSITE_URL } = require('./enums');
describe('Test Snap Error', function () {
@ -16,7 +17,9 @@ describe('Test Snap Error', function () {
};
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToSnapDapp()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -37,25 +40,8 @@ describe('Test Snap Error', function () {
await driver.clickElement('#connectError');
// switch to metamask extension and click connect
await driver.waitUntilXWindowHandles(2, 5000, 10000);
let windowHandles = await driver.getAllWindowHandles();
await driver.switchToWindowWithTitle(
'MetaMask Notification',
windowHandles,
);
await driver.clickElement(
{
text: 'Connect',
tag: 'button',
},
10000,
);
await driver.delay(2000);
// approve install of snap
windowHandles = await driver.getAllWindowHandles();
let windowHandles = await driver.getAllWindowHandles();
await driver.switchToWindowWithTitle(
'MetaMask Notification',
windowHandles,

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
const { TEST_SNAPS_WEBSITE_URL } = require('./enums');
describe('Test Snap Confirm', function () {
@ -15,7 +16,9 @@ describe('Test Snap Confirm', function () {
};
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToSnapDapp()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -31,26 +34,9 @@ describe('Test Snap Confirm', function () {
await driver.fill('#snapId1', 'npm:@metamask/test-snap-confirm');
await driver.clickElement('#connectHello');
// switch to metamask extension and click connect
await driver.waitUntilXWindowHandles(2, 5000, 10000);
let windowHandles = await driver.getAllWindowHandles();
await driver.switchToWindowWithTitle(
'MetaMask Notification',
windowHandles,
);
await driver.clickElement(
{
text: 'Connect',
tag: 'button',
},
10000,
);
await driver.delay(2000);
// approve install of snap
await driver.waitUntilXWindowHandles(2, 5000, 10000);
windowHandles = await driver.getAllWindowHandles();
let windowHandles = await driver.getAllWindowHandles();
await driver.switchToWindowWithTitle(
'MetaMask Notification',
windowHandles,
@ -71,24 +57,8 @@ describe('Test Snap Confirm', function () {
await driver.fill('#snapId2', 'npm:@metamask/test-snap-error');
await driver.clickElement('#connectError');
// switch to metamask extension and click connect
await driver.waitUntilXWindowHandles(2, 5000, 10000);
windowHandles = await driver.getAllWindowHandles();
await driver.switchToWindowWithTitle(
'MetaMask Notification',
windowHandles,
);
await driver.clickElement(
{
text: 'Connect',
tag: 'button',
},
10000,
);
await driver.delay(2000);
// approve install of snap
await driver.waitUntilXWindowHandles(2, 5000, 10000);
windowHandles = await driver.getAllWindowHandles();
await driver.switchToWindowWithTitle(
'MetaMask Notification',

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
const { TEST_SNAPS_WEBSITE_URL } = require('./enums');
describe('Test Snap manageState', function () {
@ -16,7 +17,9 @@ describe('Test Snap manageState', function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToSnapDapp()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -40,25 +43,9 @@ describe('Test Snap manageState', function () {
// connect the snap
await driver.clickElement('#connectManageState');
// switch to metamask extension and click connect
await driver.waitUntilXWindowHandles(2, 5000, 10000);
let windowHandles = await driver.getAllWindowHandles();
await driver.switchToWindowWithTitle(
'MetaMask Notification',
windowHandles,
);
await driver.clickElement(
{
text: 'Connect',
tag: 'button',
},
10000,
);
await driver.delay(2000);
// approve install of snap
await driver.waitUntilXWindowHandles(2, 5000, 10000);
windowHandles = await driver.getAllWindowHandles();
let windowHandles = await driver.getAllWindowHandles();
await driver.switchToWindowWithTitle(
'MetaMask Notification',
windowHandles,

View File

@ -1,6 +1,7 @@
const { strict: assert } = require('assert');
const { withFixtures } = require('../helpers');
const { PAGES } = require('../webdriver/driver');
const FixtureBuilder = require('../fixture-builder');
const { TEST_SNAPS_WEBSITE_URL } = require('./enums');
describe('Test Snap Notification', function () {
@ -16,7 +17,9 @@ describe('Test Snap Notification', function () {
};
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToSnapDapp()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -40,25 +43,9 @@ describe('Test Snap Notification', function () {
// connect the snap
await driver.clickElement('#connectNotification');
// switch to metamask extension and click connect
await driver.waitUntilXWindowHandles(2, 5000, 10000);
let windowHandles = await driver.getAllWindowHandles();
await driver.switchToWindowWithTitle(
'MetaMask Notification',
windowHandles,
);
await driver.clickElement(
{
text: 'Connect',
tag: 'button',
},
10000,
);
await driver.delay(2000);
// approve install of snap
await driver.waitUntilXWindowHandles(2, 5000, 10000);
windowHandles = await driver.getAllWindowHandles();
let windowHandles = await driver.getAllWindowHandles();
await driver.switchToWindowWithTitle(
'MetaMask Notification',
windowHandles,

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
const { TEST_SNAPS_WEBSITE_URL } = require('./enums');
describe('Test Snap update', function () {
@ -15,7 +16,9 @@ describe('Test Snap update', function () {
};
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToSnapDapp()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -36,30 +39,13 @@ describe('Test Snap update', function () {
await driver.fill('#snapId7', 'npm:@metamask/test-snap-confirm');
await driver.clickElement('#connectUpdateOld');
// switch to metamask extension and click connect
await driver.waitUntilXWindowHandles(3, 5000, 10000);
// approve install of snap
let windowHandles = await driver.getAllWindowHandles();
const extensionPage = windowHandles[0];
await driver.switchToWindowWithTitle(
'MetaMask Notification',
windowHandles,
);
await driver.clickElement(
{
text: 'Connect',
tag: 'button',
},
10000,
);
await driver.delay(1000);
// approve install of snap
windowHandles = await driver.getAllWindowHandles();
await driver.switchToWindowWithTitle(
'MetaMask Notification',
windowHandles,
);
await driver.clickElement({
text: 'Approve & install',
tag: 'button',

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Show account details', function () {
const ganacheOptions = {
@ -14,7 +15,7 @@ describe('Show account details', function () {
it('should show the QR code for the account', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},

View File

@ -6,6 +6,7 @@ const {
completeImportSRPOnboardingFlow,
} = require('../helpers');
const enLocaleMessages = require('../../../app/_locales/en/messages.json');
const FixtureBuilder = require('../fixture-builder');
describe('Add account', function () {
const testSeedPhrase =
@ -24,7 +25,7 @@ describe('Add account', function () {
it('should display correct new account name after create', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},
@ -50,7 +51,7 @@ describe('Add account', function () {
it('should add the same account addresses when a secret recovery phrase is imported, the account is locked, and the same secret recovery phrase is imported again', async function () {
await withFixtures(
{
fixtures: 'onboarding',
fixtures: new FixtureBuilder({ onboarding: true }).build(),
ganacheOptions,
title: this.test.title,
failOnConsoleError: false,
@ -205,7 +206,7 @@ describe('Add account', function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Hide token', function () {
const ganacheOptions = {
@ -14,7 +15,32 @@ describe('Hide token', function () {
it('hides the token when clicked', async function () {
await withFixtures(
{
fixtures: 'custom-token',
fixtures: new FixtureBuilder()
.withTokensController({
allTokens: {
'0x539': {
'0x5cfe73b6021e818b776b421b1c4db2474086a7e1': [
{
address: '0x86002be4cdd922de1ccb831582bf99284b99ac12',
decimals: 4,
image: null,
isERC721: false,
symbol: 'TST',
},
],
},
},
tokens: [
{
address: '0x86002be4cdd922de1ccb831582bf99284b99ac12',
decimals: 4,
image: null,
isERC721: false,
symbol: 'TST',
},
],
})
.build(),
ganacheOptions,
title: this.test.title,
},
@ -69,12 +95,11 @@ describe('Add existing token using search', function () {
it('renders the balance for the chosen token', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder()
.withPreferencesController({ useTokenDetection: true })
.build(),
ganacheOptions,
title: this.test.title,
driverOptions: {
timeOut: 20000,
},
},
async ({ driver }) => {
await driver.navigate();

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Address Book', function () {
const ganacheOptions = {
@ -14,7 +15,7 @@ describe('Address Book', function () {
it('Adds an entry to the address book and sends eth to that address', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},
@ -77,7 +78,21 @@ describe('Address Book', function () {
it('Sends to an address book entry', async function () {
await withFixtures(
{
fixtures: 'address-entry',
fixtures: new FixtureBuilder()
.withAddressBookController({
addressBook: {
'0x539': {
'0x2f318C334780961FB129D2a6c30D0763d9a5C970': {
address: '0x2f318C334780961FB129D2a6c30D0763d9a5C970',
chainId: '0x539',
isEns: false,
memo: '',
name: 'Test Name 1',
},
},
},
})
.build(),
ganacheOptions,
title: this.test.title,
},

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Advanced Settings', function () {
const ganacheOptions = {
@ -16,7 +17,7 @@ describe('Advanced Settings', function () {
await withFixtures(
{
dapp: true,
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},
@ -53,7 +54,7 @@ describe('Advanced Settings', function () {
await withFixtures(
{
dapp: true,
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Auto-Lock Timer', function () {
const ganacheOptions = {
@ -15,7 +16,7 @@ describe('Auto-Lock Timer', function () {
it('should automatically lock the wallet once the idle time has elapsed', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},

View File

@ -5,6 +5,7 @@ const {
withFixtures,
createDownloadFolder,
} = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
const downloadsFolder = `${process.cwd()}/test-artifacts/downloads`;
@ -48,7 +49,7 @@ describe('Backup', function () {
it('should create backup for the account', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
failOnConsoleError: false,

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Chain Interactions', function () {
const port = 8546;
@ -18,7 +19,7 @@ describe('Chain Interactions', function () {
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},
@ -70,7 +71,7 @@ describe('Chain Interactions', function () {
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},
@ -99,7 +100,9 @@ describe('Chain Interactions', function () {
await driver.switchToWindow(extension);
// verify current network
const networkDisplay = await driver.findElement('.network-display');
const networkDisplay = await driver.findElement(
'[data-testid="network-display"]',
);
assert.equal(await networkDisplay.getText(), `Localhost ${port}`);
},
);

View File

@ -1,6 +1,7 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const { SMART_CONTRACTS } = require('../seeder/smart-contracts');
const FixtureBuilder = require('../fixture-builder');
describe('Collectibles', function () {
const smartContract = SMART_CONTRACTS.COLLECTIBLES;
@ -17,7 +18,9 @@ describe('Collectibles', function () {
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
smartContract,
title: this.test.title,
@ -69,7 +72,9 @@ describe('Collectibles', function () {
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
smartContract,
title: this.test.title,
@ -134,7 +139,9 @@ describe('Collectibles', function () {
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
smartContract,
title: this.test.title,
@ -203,7 +210,9 @@ describe('Collectibles', function () {
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
smartContract,
title: this.test.title,

View File

@ -1,6 +1,7 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const { SMART_CONTRACTS } = require('../seeder/smart-contracts');
const FixtureBuilder = require('../fixture-builder');
describe('Deploy contract and call contract methods', function () {
const ganacheOptions = {
@ -17,7 +18,9 @@ describe('Deploy contract and call contract methods', function () {
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
smartContract,
title: this.test.title,

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures, largeDelayMs } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Stores custom RPC history', function () {
const ganacheOptions = {
@ -17,7 +18,7 @@ describe('Stores custom RPC history', function () {
const symbol = 'TEST';
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions: { ...ganacheOptions, concurrent: { port, chainId } },
title: this.test.title,
},
@ -74,7 +75,7 @@ describe('Stores custom RPC history', function () {
it('warns user when they enter url for an already configured network', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},
@ -117,7 +118,7 @@ describe('Stores custom RPC history', function () {
it('warns user when they enter chainId for an already configured network', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
failOnConsoleError: false,
@ -129,7 +130,7 @@ describe('Stores custom RPC history', function () {
// duplicate network
const newRpcUrl = 'http://localhost:8544';
const duplicateChainId = '0x539';
const duplicateChainId = '1';
await driver.delay(largeDelayMs);
@ -153,7 +154,7 @@ describe('Stores custom RPC history', function () {
await chainIdInput.clear();
await chainIdInput.sendKeys(duplicateChainId);
await driver.findElement({
text: 'This Chain ID is currently used by the Localhost 8545 network.',
text: 'This Chain ID is currently used by the mainnet network.',
tag: 'h6',
});
@ -171,7 +172,7 @@ describe('Stores custom RPC history', function () {
it('selects another provider', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},
@ -192,7 +193,26 @@ describe('Stores custom RPC history', function () {
it('finds all recent RPCs in history', async function () {
await withFixtures(
{
fixtures: 'custom-rpc',
fixtures: new FixtureBuilder()
.withPreferencesController({
frequentRpcListDetail: [
{
rpcUrl: 'http://127.0.0.1:8545/1',
chainId: '0x539',
ticker: 'ETH',
nickname: 'http://127.0.0.1:8545/1',
rpcPrefs: {},
},
{
rpcUrl: 'http://127.0.0.1:8545/2',
chainId: '0x539',
ticker: 'ETH',
nickname: 'http://127.0.0.1:8545/2',
rpcPrefs: {},
},
],
})
.build(),
ganacheOptions,
title: this.test.title,
},
@ -221,7 +241,26 @@ describe('Stores custom RPC history', function () {
it('deletes a custom RPC', async function () {
await withFixtures(
{
fixtures: 'custom-rpc',
fixtures: new FixtureBuilder()
.withPreferencesController({
frequentRpcListDetail: [
{
rpcUrl: 'http://127.0.0.1:8545/1',
chainId: '0x539',
ticker: 'ETH',
nickname: 'http://127.0.0.1:8545/1',
rpcPrefs: {},
},
{
rpcUrl: 'http://127.0.0.1:8545/2',
chainId: '0x539',
ticker: 'ETH',
nickname: 'http://127.0.0.1:8545/2',
rpcPrefs: {},
},
],
})
.build(),
ganacheOptions,
title: this.test.title,
failOnConsoleError: false,

View File

@ -6,6 +6,7 @@ const {
withFixtures,
getWindowHandles,
} = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe.skip('Create token, approve token and approve token without gas', function () {
describe('Add a custom token from a dapp', function () {
@ -23,7 +24,9 @@ describe.skip('Create token, approve token and approve token without gas', funct
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -114,7 +117,9 @@ describe.skip('Create token, approve token and approve token without gas', funct
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -182,7 +187,9 @@ describe.skip('Create token, approve token and approve token without gas', funct
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -292,7 +299,9 @@ describe.skip('Create token, approve token and approve token without gas', funct
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
title: this.test.title,
},

View File

@ -1,9 +1,6 @@
const { strict: assert } = require('assert');
const {
convertToHexValue,
withFixtures,
connectDappWithExtensionPopup,
} = require('../helpers');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Dapp interactions', function () {
let windowHandles;
@ -22,7 +19,7 @@ describe('Dapp interactions', function () {
await withFixtures(
{
dapp: true,
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions: {
...ganacheOptions,
concurrent: { port: 8546, chainId: 1338 },
@ -34,8 +31,7 @@ describe('Dapp interactions', function () {
await driver.fill('#password', 'correct horse battery staple');
await driver.press('#password', driver.Key.ENTER);
// Connect to Dapp0
await connectDappWithExtensionPopup(driver, 0);
await driver.openNewPage('http://127.0.0.1:8080/');
windowHandles = await driver.getAllWindowHandles();
extension = windowHandles[0];
@ -68,7 +64,9 @@ describe('Dapp interactions', function () {
await withFixtures(
{
dapp: true,
fixtures: 'imported-account',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
dappOptions: { numberOfDapps: 2 },
title: this.test.title,
@ -78,8 +76,7 @@ describe('Dapp interactions', function () {
await driver.fill('#password', 'correct horse battery staple');
await driver.press('#password', driver.Key.ENTER);
// Connect to Dapp0
await connectDappWithExtensionPopup(driver, 0);
await driver.openNewPage('http://127.0.0.1:8080/');
windowHandles = await driver.getAllWindowHandles();
extension = windowHandles[0];

View File

@ -1,10 +1,10 @@
const { strict: assert } = require('assert');
const {
convertToHexValue,
connectDappWithExtensionPopup,
getWindowHandles,
withFixtures,
} = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Editing Confirm Transaction', function () {
it('allows selecting high, medium, low gas estimates on edit gas fee popover', async function () {
@ -20,7 +20,12 @@ describe('Editing Confirm Transaction', function () {
};
await withFixtures(
{
fixtures: 'eip-1559-v2',
fixtures: new FixtureBuilder()
.withPreferencesController({
eip1559V2Enabled: true,
})
.withTransactionControllerTypeTwoTransaction()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -34,7 +39,7 @@ describe('Editing Confirm Transaction', function () {
'.currency-display-component__text',
);
const transactionAmount = transactionAmounts[0];
assert.equal(await transactionAmount.getText(), '2.2');
assert.equal(await transactionAmount.getText(), '1');
// update estimates to high
await driver.clickElement('[data-testid="edit-gas-fee-button"]');
@ -80,7 +85,7 @@ describe('Editing Confirm Transaction', function () {
'.transaction-list-item__primary-currency',
);
assert.equal(txValues.length, 1);
assert.ok(/-2.2\s*ETH/u.test(await txValues[0].getText()));
assert.ok(/-1\s*ETH/u.test(await txValues[0].getText()));
},
);
});
@ -98,7 +103,12 @@ describe('Editing Confirm Transaction', function () {
};
await withFixtures(
{
fixtures: 'eip-1559-v2',
fixtures: new FixtureBuilder()
.withPreferencesController({
eip1559V2Enabled: true,
})
.withTransactionControllerTypeTwoTransaction()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -112,7 +122,7 @@ describe('Editing Confirm Transaction', function () {
'.currency-display-component__text',
);
const transactionAmount = transactionAmounts[0];
assert.equal(await transactionAmount.getText(), '2.2');
assert.equal(await transactionAmount.getText(), '1');
// update estimates to high
await driver.clickElement('[data-testid="edit-gas-fee-button"]');
@ -145,7 +155,7 @@ describe('Editing Confirm Transaction', function () {
});
await driver.waitForSelector({
css: '.transaction-detail-item:nth-of-type(2) h6:nth-of-type(2)',
text: '2.20085 ETH',
text: '1.00085 ETH',
});
// confirms the transaction
@ -163,7 +173,7 @@ describe('Editing Confirm Transaction', function () {
'.transaction-list-item__primary-currency',
);
assert.equal(txValues.length, 1);
assert.ok(/-2.2\s*ETH/u.test(await txValues[0].getText()));
assert.ok(/-1\s*ETH/u.test(await txValues[0].getText()));
},
);
});
@ -181,7 +191,12 @@ describe('Editing Confirm Transaction', function () {
};
await withFixtures(
{
fixtures: 'eip-1559-v2-dapp',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.withPreferencesController({
eip1559V2Enabled: true,
})
.build(),
ganacheOptions,
title: this.test.title,
dapp: true,
@ -194,7 +209,7 @@ describe('Editing Confirm Transaction', function () {
await driver.press('#password', driver.Key.ENTER);
// open dapp and connect
await connectDappWithExtensionPopup(driver);
await driver.openNewPage('http://127.0.0.1:8080/');
await driver.clickElement({
text: 'Send EIP 1559 Transaction',
tag: 'button',

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Encrypt Decrypt', function () {
const ganacheOptions = {
@ -17,7 +18,9 @@ describe('Encrypt Decrypt', function () {
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
title: this.test.title,
},

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Sentry errors', function () {
async function mockSegment(mockServer) {
@ -26,7 +27,12 @@ describe('Sentry errors', function () {
it('should send error events', async function () {
await withFixtures(
{
fixtures: 'metrics-enabled',
fixtures: new FixtureBuilder()
.withMetaMetricsController({
metaMetricsId: 'fake-metrics-id',
participateInMetaMetrics: true,
})
.build(),
ganacheOptions,
title: this.test.title,
failOnConsoleError: false,

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Eth sign', function () {
it('can initiate and confirm a eth sign', async function () {
@ -19,7 +20,9 @@ describe('Eth sign', function () {
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
title: this.test.title,
},

View File

@ -1,6 +1,7 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const { SMART_CONTRACTS } = require('../seeder/smart-contracts');
const FixtureBuilder = require('../fixture-builder');
describe('Failing contract interaction ', function () {
const smartContract = SMART_CONTRACTS.FAILING;
@ -18,7 +19,9 @@ describe('Failing contract interaction ', function () {
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
smartContract,
title: this.test.title,

View File

@ -8,6 +8,7 @@ const {
completeImportSRPOnboardingFlow,
completeImportSRPOnboardingFlowWordByWord,
} = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('MetaMask Import UI', function () {
it('Importing wallet using Secret Recovery Phrase', async function () {
@ -27,7 +28,7 @@ describe('MetaMask Import UI', function () {
await withFixtures(
{
fixtures: 'onboarding',
fixtures: new FixtureBuilder({ onboarding: true }).build(),
ganacheOptions,
title: this.test.title,
failOnConsoleError: false,
@ -145,7 +146,7 @@ describe('MetaMask Import UI', function () {
await withFixtures(
{
fixtures: 'onboarding',
fixtures: new FixtureBuilder({ onboarding: true }).build(),
ganacheOptions,
title: this.test.title,
failOnConsoleError: false,
@ -192,7 +193,10 @@ describe('MetaMask Import UI', function () {
await withFixtures(
{
fixtures: 'import-ui',
fixtures: new FixtureBuilder()
.withKeyringControllerImportedAccountVault()
.withPreferencesControllerImportedAccountIdentities()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -295,7 +299,10 @@ describe('MetaMask Import UI', function () {
await withFixtures(
{
fixtures: 'import-ui',
fixtures: new FixtureBuilder()
.withKeyringControllerImportedAccountVault()
.withPreferencesControllerImportedAccountIdentities()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -315,7 +322,6 @@ describe('MetaMask Import UI', function () {
const importJsonFile = path.join(
__dirname,
'..',
'fixtures',
'import-utc-json',
'test-json-import-account-file.json',
);
@ -368,7 +374,10 @@ describe('MetaMask Import UI', function () {
await withFixtures(
{
fixtures: 'import-ui',
fixtures: new FixtureBuilder()
.withKeyringControllerImportedAccountVault()
.withPreferencesControllerImportedAccountIdentities()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -407,7 +416,7 @@ describe('MetaMask Import UI', function () {
await withFixtures(
{
fixtures: 'import-ui',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Gas API fallback', function () {
async function mockGasApiDown(mockServer) {
@ -29,7 +30,7 @@ describe('Gas API fallback', function () {
it('error message is displayed but gas recommendation is not displayed', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
testSpecificMock: mockGasApiDown,
ganacheOptions,
title: this.test.title,

View File

@ -1,6 +1,7 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures, tinyDelayMs } = require('../helpers');
const enLocaleMessages = require('../../../app/_locales/en/messages.json');
const FixtureBuilder = require('../fixture-builder');
describe('Incremental Security', function () {
const ganacheOptions = {
@ -21,7 +22,7 @@ describe('Incremental Security', function () {
await withFixtures(
{
dapp: true,
fixtures: 'onboarding',
fixtures: new FixtureBuilder({ onboarding: true }).build(),
ganacheOptions,
title: this.test.title,
failOnConsoleError: false,

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Localization', function () {
it('can correctly display Philippine peso symbol and code', async function () {
@ -13,7 +14,20 @@ describe('Localization', function () {
],
};
await withFixtures(
{ fixtures: 'localization', ganacheOptions, title: this.test.title },
{
fixtures: new FixtureBuilder()
.withCurrencyController({
currentCurrency: 'php',
})
.withPreferencesController({
preferences: {
showFiatInTestnets: true,
},
})
.build(),
ganacheOptions,
title: this.test.title,
},
async ({ driver }) => {
await driver.navigate();
await driver.fill('#password', 'correct horse battery staple');

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Lock and unlock', function () {
const ganacheOptions = {
@ -14,7 +15,7 @@ describe('Lock and unlock', function () {
it('successfully unlocks after lock', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},

View File

@ -6,6 +6,7 @@ const {
} = require('../../helpers/protect-intrinsics-helpers');
const { convertToHexValue, withFixtures } = require('../helpers');
const { PAGES } = require('../webdriver/driver');
const FixtureBuilder = require('../fixture-builder');
const isFirefox = process.env.SELENIUM_BROWSER === Browser.FIREFOX;
@ -65,7 +66,7 @@ describe('lockdown', function () {
await withFixtures(
{
// The fixtures used here is arbitrary. Any fixture would do.
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},

View File

@ -1,6 +1,7 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures, tinyDelayMs } = require('../helpers');
const enLocaleMessages = require('../../../app/_locales/en/messages.json');
const FixtureBuilder = require('../fixture-builder');
describe('MetaMask Responsive UI', function () {
it('Creating a new wallet', async function () {
@ -8,7 +9,7 @@ describe('MetaMask Responsive UI', function () {
await withFixtures(
{
fixtures: 'onboarding',
fixtures: new FixtureBuilder({ onboarding: true }).build(),
driverOptions,
title: this.test.title,
failOnConsoleError: false,
@ -154,7 +155,7 @@ describe('MetaMask Responsive UI', function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
driverOptions,
title: this.test.title,
failOnConsoleError: false,
@ -200,7 +201,7 @@ describe('MetaMask Responsive UI', function () {
};
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
driverOptions,
ganacheOptions,
title: this.test.title,

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Segment metrics', function () {
async function mockSegment(mockServer) {
@ -27,7 +28,12 @@ describe('Segment metrics', function () {
it('should send first three Page metric events upon fullscreen page load', async function () {
await withFixtures(
{
fixtures: 'metrics-enabled',
fixtures: new FixtureBuilder()
.withMetaMetricsController({
metaMetricsId: 'fake-metrics-id',
participateInMetaMetrics: true,
})
.build(),
ganacheOptions,
title: this.test.title,
failOnConsoleError: false,

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Navigate transactions', function () {
const ganacheOptions = {
@ -14,7 +15,9 @@ describe('Navigate transactions', function () {
it('should navigate the unapproved transactions', async function () {
await withFixtures(
{
fixtures: 'navigate-transactions',
fixtures: new FixtureBuilder()
.withTransactionControllerMultipleTransactions()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -102,7 +105,10 @@ describe('Navigate transactions', function () {
await withFixtures(
{
dapp: true,
fixtures: 'navigate-transactions',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.withTransactionControllerMultipleTransactions()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -149,7 +155,9 @@ describe('Navigate transactions', function () {
it('should reject and remove an unapproved transaction', async function () {
await withFixtures(
{
fixtures: 'navigate-transactions',
fixtures: new FixtureBuilder()
.withTransactionControllerMultipleTransactions()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -180,7 +188,9 @@ describe('Navigate transactions', function () {
it('should confirm and remove an unapproved transaction', async function () {
await withFixtures(
{
fixtures: 'navigate-transactions',
fixtures: new FixtureBuilder()
.withTransactionControllerMultipleTransactions()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -211,7 +221,9 @@ describe('Navigate transactions', function () {
it('should reject and remove all unapproved transactions', async function () {
await withFixtures(
{
fixtures: 'navigate-transactions',
fixtures: new FixtureBuilder()
.withTransactionControllerMultipleTransactions()
.build(),
ganacheOptions,
title: this.test.title,
},

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Permissions', function () {
it('sets permissions and connect to Dapp', async function () {
@ -16,7 +17,7 @@ describe('Permissions', function () {
await withFixtures(
{
dapp: true,
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Personal sign', function () {
it('can initiate and confirm a personal sign', async function () {
@ -16,7 +17,9 @@ describe('Personal sign', function () {
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
title: this.test.title,
},

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
const PHISHFORT_CDN_URL =
'https://static.metafi.codefi.network/api/v1/lists/phishfort_hotlist.json';
@ -43,7 +44,7 @@ describe('Phishing Detection', function () {
it('should display the MetaMask Phishing Detection page and take the user to the blocked page if they continue', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
testSpecificMock: mockPhishingDetection,
@ -67,7 +68,7 @@ describe('Phishing Detection', function () {
it('should display the MetaMask Phishing Detection page in an iframe and take the user to the blocked page if they continue', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
testSpecificMock: mockPhishingDetection,
@ -103,7 +104,7 @@ describe('Phishing Detection', function () {
it('should display the MetaMask Phishing Detection page in an iframe but should NOT take the user to the blocked page if it is not an accessible resource', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
testSpecificMock: mockPhishingDetection,
@ -142,7 +143,7 @@ describe('Phishing Detection', function () {
it('should display the MetaMask Phishing Detection page with the correct new issue link if the issue was detected from the phishfort list', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
testSpecificMock: mockPhishfortPhishingDetection,

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Portfolio site', function () {
const ganacheOptions = {
@ -15,7 +16,7 @@ describe('Portfolio site', function () {
await withFixtures(
{
dapp: true,
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},

View File

@ -1,6 +1,7 @@
const { strict: assert } = require('assert');
const { errorCodes } = require('eth-rpc-errors');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('MetaMask', function () {
const ganacheOptions = {
@ -17,7 +18,9 @@ describe('MetaMask', function () {
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -70,7 +73,9 @@ describe('MetaMask', function () {
{
dapp: true,
failOnConsoleError: false,
fixtures: 'connected-state',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
title: this.test.title,
},

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Editing Confirm Transaction', function () {
it('goes back from confirm page to edit eth value, gas price and gas limit', async function () {
@ -14,7 +15,9 @@ describe('Editing Confirm Transaction', function () {
};
await withFixtures(
{
fixtures: 'send-edit',
fixtures: new FixtureBuilder()
.withTransactionControllerTypeOneTransaction()
.build(),
ganacheOptions,
title: this.test.title,
failOnConsoleError: false,
@ -92,7 +95,12 @@ describe('Editing Confirm Transaction', function () {
};
await withFixtures(
{
fixtures: 'send-edit-v2',
fixtures: new FixtureBuilder()
.withPreferencesController({
eip1559V2Enabled: true,
})
.withTransactionControllerTypeTwoTransaction()
.build(),
ganacheOptions,
title: this.test.title,
failOnConsoleError: false,

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Send ETH from inside MetaMask using default gas', function () {
const ganacheOptions = {
@ -14,7 +15,7 @@ describe('Send ETH from inside MetaMask using default gas', function () {
it('finds the transaction in the transactions list', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},
@ -105,7 +106,13 @@ describe('Send ETH non-contract address with data that matches ERC20 transfer da
it('renders the correct recipient on the confirmation screen', async function () {
await withFixtures(
{
fixtures: 'special-settings',
fixtures: new FixtureBuilder()
.withPreferencesController({
featureFlags: {
sendHexData: true,
},
})
.build(),
ganacheOptions,
title: this.test.title,
},
@ -154,7 +161,7 @@ describe('Send ETH from inside MetaMask using advanced gas modal', function () {
it('finds the transaction in the transactions list', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},
@ -221,7 +228,9 @@ describe('Send ETH from dapp using advanced gas controls', function () {
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
title: this.test.title,
},

View File

@ -1,6 +1,7 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const { SMART_CONTRACTS } = require('../seeder/smart-contracts');
const FixtureBuilder = require('../fixture-builder');
const hexPrefixedAddress = '0x2f318C334780961FB129D2a6c30D0763d9a5C970';
const nonHexPrefixedAddress = hexPrefixedAddress.substring(2);
@ -18,7 +19,7 @@ describe('Send ETH to a 40 character hexadecimal address', function () {
it('should ensure the address is prefixed with 0x when pasted and should send ETH to a valid hexadecimal address', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
failOnConsoleError: false,
@ -69,7 +70,7 @@ describe('Send ETH to a 40 character hexadecimal address', function () {
it('should ensure the address is prefixed with 0x when typed and should send ETH to a valid hexadecimal address', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
failOnConsoleError: false,
@ -134,7 +135,9 @@ describe('Send ERC20 to a 40 character hexadecimal address', function () {
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
smartContract,
title: this.test.title,
@ -223,7 +226,9 @@ describe('Send ERC20 to a 40 character hexadecimal address', function () {
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
smartContract,
title: this.test.title,

View File

@ -1,6 +1,7 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const { SMART_CONTRACTS } = require('../seeder/smart-contracts');
const FixtureBuilder = require('../fixture-builder');
describe('Send ERC20 token to contract address', function () {
const smartContract = SMART_CONTRACTS.HST;
@ -17,7 +18,9 @@ describe('Send ERC20 token to contract address', function () {
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
smartContract,
title: this.test.title,

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Settings', function () {
const ganacheOptions = {
@ -15,7 +16,7 @@ describe('Settings', function () {
it('checks jazzicon and blockies icons', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Settings Search', function () {
const ganacheOptions = {
@ -25,7 +26,7 @@ describe('Settings Search', function () {
it('should find element inside the General tab', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},
@ -51,7 +52,7 @@ describe('Settings Search', function () {
it('should find element inside the Advanced tab', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},
@ -78,7 +79,7 @@ describe('Settings Search', function () {
it('should find element inside the Contacts tab', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},
@ -105,7 +106,7 @@ describe('Settings Search', function () {
it('should find element inside the Security tab', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},
@ -132,7 +133,7 @@ describe('Settings Search', function () {
it('should find element inside the Alerts tab', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},
@ -159,7 +160,7 @@ describe('Settings Search', function () {
it('should find element inside the Networks tab', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},
@ -186,7 +187,7 @@ describe('Settings Search', function () {
it('should find element inside the Experimental tab', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},
@ -213,7 +214,7 @@ describe('Settings Search', function () {
it('should find element inside the About tab', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},
@ -240,7 +241,7 @@ describe('Settings Search', function () {
it('should display "Element not found" for a non-existing element', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},

View File

@ -4,6 +4,7 @@ const {
withFixtures,
regularDelayMs,
} = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Sign Typed Data V4 Signature Request', function () {
it('can initiate and confirm a Signature Request', async function () {
@ -20,7 +21,9 @@ describe('Sign Typed Data V4 Signature Request', function () {
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -102,7 +105,9 @@ describe('Sign Typed Data V3 Signature Request', function () {
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
title: this.test.title,
},
@ -180,7 +185,9 @@ describe('Sign Typed Data Signature Request', function () {
await withFixtures(
{
dapp: true,
fixtures: 'connected-state',
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
title: this.test.title,
},

View File

@ -1,4 +1,5 @@
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Simple send', function () {
it('can send a simple transaction from one account to another', async function () {
@ -12,7 +13,11 @@ describe('Simple send', function () {
],
};
await withFixtures(
{ fixtures: 'imported-account', ganacheOptions, title: this.test.title },
{
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},
async ({ driver }) => {
await driver.navigate();
await driver.fill('#password', 'correct horse battery staple');

View File

@ -5,6 +5,7 @@ const {
withFixtures,
createDownloadFolder,
} = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
const downloadsFolder = `${process.cwd()}/test-artifacts/downloads`;
@ -31,7 +32,7 @@ describe('State logs', function () {
it('should download state logs for the account', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
failOnConsoleError: false,

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Swap Eth for another Token', function () {
const ganacheOptions = {
@ -14,7 +15,7 @@ describe('Swap Eth for another Token', function () {
it('Completes a Swap between Eth and Matic', async function () {
await withFixtures(
{
fixtures: 'special-settings',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
failOnConsoleError: false,

View File

@ -1,5 +1,6 @@
const { convertToHexValue, withFixtures, largeDelayMs } = require('../helpers');
const ThreeboxMockServer = require('../mock-3box/threebox-mock-server');
const FixtureBuilder = require('../fixture-builder');
describe('Threebox', function () {
const ganacheOptions = {
@ -23,7 +24,7 @@ describe('Threebox', function () {
it('Set up data to be restored by 3box', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},
@ -67,7 +68,16 @@ describe('Threebox', function () {
it('Restore from 3box', async function () {
await withFixtures(
{
fixtures: 'threebox-enabled',
fixtures: new FixtureBuilder()
.withThreeBoxController({
threeBoxSyncingAllowed: true,
showRestorePrompt: true,
threeBoxLastUpdated: 0,
threeBoxAddress: '0x64480aa2768ef12f3f19c5a01206ceb0f82d06b9',
threeBoxSynced: true,
threeBoxDisabled: false,
})
.build(),
ganacheOptions,
title: this.test.title,
},

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
describe('Token Details', function () {
const ganacheOptions = {
@ -14,7 +15,7 @@ describe('Token Details', function () {
it('should show token details for an imported token', async function () {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},

View File

@ -8,6 +8,7 @@ const {
getFirstParentDirectoryThatExists,
} = require('../helpers/file');
const { convertToHexValue, withFixtures } = require('./helpers');
const FixtureBuilder = require('./fixture-builder');
const ganacheOptions = {
accounts: [
@ -24,7 +25,7 @@ async function loadNewAccount() {
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
},
async ({ driver }) => {
@ -52,7 +53,7 @@ async function confirmTx() {
let loadingTimes;
await withFixtures(
{
fixtures: 'imported-account',
fixtures: new FixtureBuilder().build(),
ganacheOptions,
},
async ({ driver }) => {