Revert "Revert "Merge pull request #16353 from MetaMask/Version-v10.22.0""
This reverts commit d91ce9c4b5
.
feature/default_network_editable
parent
205d60f3bd
commit
ace7b0cda9
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 294 B After Width: | Height: | Size: 493 B |
@ -1,305 +0,0 @@ |
||||
import { ObservableStore } from '@metamask/obs-store'; |
||||
|
||||
/* eslint-disable import/first,import/order */ |
||||
const Box = process.env.IN_TEST |
||||
? require('../../../development/mock-3box') |
||||
: require('3box'); |
||||
/* eslint-enable import/order */ |
||||
|
||||
import log from 'loglevel'; |
||||
import { JsonRpcEngine } from 'json-rpc-engine'; |
||||
import { providerFromEngine } from 'eth-json-rpc-middleware'; |
||||
import Migrator from '../lib/migrator'; |
||||
import migrations from '../migrations'; |
||||
import createOriginMiddleware from '../lib/createOriginMiddleware'; |
||||
import createMetamaskMiddleware from './network/createMetamaskMiddleware'; |
||||
/* eslint-enable import/first */ |
||||
|
||||
const SYNC_TIMEOUT = 60 * 1000; // one minute
|
||||
|
||||
export default class ThreeBoxController { |
||||
constructor(opts = {}) { |
||||
const { |
||||
preferencesController, |
||||
keyringController, |
||||
addressBookController, |
||||
version, |
||||
getKeyringControllerState, |
||||
trackMetaMetricsEvent, |
||||
} = opts; |
||||
|
||||
this.preferencesController = preferencesController; |
||||
this.addressBookController = addressBookController; |
||||
this.keyringController = keyringController; |
||||
this.provider = this._createProvider({ |
||||
version, |
||||
getAccounts: async ({ origin }) => { |
||||
if (origin !== '3Box') { |
||||
return []; |
||||
} |
||||
const { isUnlocked } = getKeyringControllerState(); |
||||
|
||||
const accounts = await this.keyringController.getAccounts(); |
||||
|
||||
if (isUnlocked && accounts[0]) { |
||||
const appKeyAddress = await this.keyringController.getAppKeyAddress( |
||||
accounts[0], |
||||
'wallet://3box.metamask.io', |
||||
); |
||||
return [appKeyAddress]; |
||||
} |
||||
return []; |
||||
}, |
||||
processPersonalMessage: async (msgParams) => { |
||||
const accounts = await this.keyringController.getAccounts(); |
||||
return keyringController.signPersonalMessage( |
||||
{ ...msgParams, from: accounts[0] }, |
||||
{ |
||||
withAppKeyOrigin: 'wallet://3box.metamask.io', |
||||
}, |
||||
); |
||||
}, |
||||
}); |
||||
this._trackMetaMetricsEvent = trackMetaMetricsEvent; |
||||
|
||||
const initState = { |
||||
threeBoxSyncingAllowed: false, |
||||
showRestorePrompt: true, |
||||
threeBoxLastUpdated: 0, |
||||
...opts.initState, |
||||
threeBoxAddress: null, |
||||
threeBoxSynced: false, |
||||
threeBoxDisabled: false, |
||||
}; |
||||
this.store = new ObservableStore(initState); |
||||
this.registeringUpdates = false; |
||||
this.lastMigration = migrations |
||||
.sort((a, b) => a.version - b.version) |
||||
.slice(-1)[0]; |
||||
|
||||
if (initState.threeBoxSyncingAllowed) { |
||||
this.init(); |
||||
} |
||||
} |
||||
|
||||
async init() { |
||||
const accounts = await this.keyringController.getAccounts(); |
||||
this.address = accounts[0]; |
||||
|
||||
this._trackMetaMetricsEvent({ |
||||
event: '3Box Initiated', |
||||
category: '3Box', |
||||
}); |
||||
|
||||
if (this.address && !(this.box && this.store.getState().threeBoxSynced)) { |
||||
await this.new3Box(); |
||||
} |
||||
} |
||||
|
||||
async _update3Box() { |
||||
try { |
||||
const { threeBoxSyncingAllowed, threeBoxSynced } = this.store.getState(); |
||||
if (threeBoxSyncingAllowed && threeBoxSynced) { |
||||
const newState = { |
||||
preferences: this.preferencesController.store.getState(), |
||||
addressBook: this.addressBookController.state, |
||||
lastUpdated: Date.now(), |
||||
lastMigration: this.lastMigration, |
||||
}; |
||||
|
||||
await this.space.private.set( |
||||
'metamaskBackup', |
||||
JSON.stringify(newState), |
||||
); |
||||
await this.setShowRestorePromptToFalse(); |
||||
} |
||||
} catch (error) { |
||||
console.error(error); |
||||
} |
||||
} |
||||
|
||||
_createProvider(providerOpts) { |
||||
const metamaskMiddleware = createMetamaskMiddleware(providerOpts); |
||||
const engine = new JsonRpcEngine(); |
||||
engine.push(createOriginMiddleware({ origin: '3Box' })); |
||||
engine.push(metamaskMiddleware); |
||||
const provider = providerFromEngine(engine); |
||||
return provider; |
||||
} |
||||
|
||||
_waitForOnSyncDone() { |
||||
return new Promise((resolve) => { |
||||
this.box.onSyncDone(() => { |
||||
log.debug('3Box box sync done'); |
||||
return resolve(); |
||||
}); |
||||
}); |
||||
} |
||||
|
||||
async new3Box() { |
||||
const accounts = await this.keyringController.getAccounts(); |
||||
this.address = await this.keyringController.getAppKeyAddress( |
||||
accounts[0], |
||||
'wallet://3box.metamask.io', |
||||
); |
||||
let backupExists; |
||||
try { |
||||
const threeBoxConfig = await Box.getConfig(this.address); |
||||
backupExists = threeBoxConfig.spaces && threeBoxConfig.spaces.metamask; |
||||
} catch (e) { |
||||
if (e.message.match(/^Error: Invalid response \(404\)/u)) { |
||||
this._trackMetaMetricsEvent({ |
||||
event: '3Box Backup does not exist', |
||||
category: '3Box', |
||||
}); |
||||
|
||||
backupExists = false; |
||||
} else { |
||||
this._trackMetaMetricsEvent({ |
||||
event: '3Box Config Error', |
||||
category: '3Box', |
||||
}); |
||||
|
||||
throw e; |
||||
} |
||||
} |
||||
if (this.getThreeBoxSyncingState() || backupExists) { |
||||
this.store.updateState({ threeBoxSynced: false }); |
||||
|
||||
let timedOut = false; |
||||
const syncTimeout = setTimeout(() => { |
||||
log.error(`3Box sync timed out after ${SYNC_TIMEOUT} ms`); |
||||
timedOut = true; |
||||
this.store.updateState({ |
||||
threeBoxDisabled: true, |
||||
threeBoxSyncingAllowed: false, |
||||
}); |
||||
}, SYNC_TIMEOUT); |
||||
try { |
||||
this.box = await Box.openBox(this.address, this.provider); |
||||
await this._waitForOnSyncDone(); |
||||
this.space = await this.box.openSpace('metamask', { |
||||
onSyncDone: async () => { |
||||
const stateUpdate = { |
||||
threeBoxSynced: true, |
||||
threeBoxAddress: this.address, |
||||
}; |
||||
if (timedOut) { |
||||
log.info(`3Box sync completed after timeout; no longer disabled`); |
||||
stateUpdate.threeBoxDisabled = false; |
||||
} |
||||
|
||||
clearTimeout(syncTimeout); |
||||
this.store.updateState(stateUpdate); |
||||
|
||||
log.debug('3Box space sync done'); |
||||
|
||||
this._trackMetaMetricsEvent({ |
||||
event: '3Box Synced', |
||||
category: '3Box', |
||||
}); |
||||
}, |
||||
}); |
||||
} catch (e) { |
||||
this._trackMetaMetricsEvent({ |
||||
event: '3Box Initiation Error', |
||||
category: '3Box', |
||||
}); |
||||
|
||||
console.error(e); |
||||
throw e; |
||||
} |
||||
} |
||||
} |
||||
|
||||
async getLastUpdated() { |
||||
const res = await this.space.private.get('metamaskBackup'); |
||||
const parsedRes = JSON.parse(res || '{}'); |
||||
return parsedRes.lastUpdated; |
||||
} |
||||
|
||||
async migrateBackedUpState(backedUpState) { |
||||
const migrator = new Migrator({ migrations }); |
||||
const { preferences, addressBook } = JSON.parse(backedUpState); |
||||
const formattedStateBackup = { |
||||
PreferencesController: preferences, |
||||
AddressBookController: addressBook, |
||||
}; |
||||
const initialMigrationState = |
||||
migrator.generateInitialState(formattedStateBackup); |
||||
const migratedState = await migrator.migrateData(initialMigrationState); |
||||
return { |
||||
preferences: migratedState.data.PreferencesController, |
||||
addressBook: migratedState.data.AddressBookController, |
||||
}; |
||||
} |
||||
|
||||
async restoreFromThreeBox() { |
||||
const backedUpState = await this.space.private.get('metamaskBackup'); |
||||
const { preferences, addressBook } = await this.migrateBackedUpState( |
||||
backedUpState, |
||||
); |
||||
this.store.updateState({ threeBoxLastUpdated: backedUpState.lastUpdated }); |
||||
preferences && this.preferencesController.store.updateState(preferences); |
||||
addressBook && this.addressBookController.update(addressBook, true); |
||||
this.setShowRestorePromptToFalse(); |
||||
|
||||
this._trackMetaMetricsEvent({ |
||||
event: '3Box Restored Data', |
||||
category: '3Box', |
||||
}); |
||||
} |
||||
|
||||
turnThreeBoxSyncingOn() { |
||||
this._trackMetaMetricsEvent({ |
||||
event: '3Box Sync Turned On', |
||||
category: '3Box', |
||||
}); |
||||
|
||||
this._registerUpdates(); |
||||
} |
||||
|
||||
turnThreeBoxSyncingOff() { |
||||
this._trackMetaMetricsEvent({ |
||||
event: '3Box Sync Turned Off', |
||||
category: '3Box', |
||||
}); |
||||
|
||||
this.box.logout(); |
||||
} |
||||
|
||||
setShowRestorePromptToFalse() { |
||||
this.store.updateState({ showRestorePrompt: false }); |
||||
} |
||||
|
||||
setThreeBoxSyncingPermission(newThreeboxSyncingState) { |
||||
if (this.store.getState().threeBoxDisabled) { |
||||
return; |
||||
} |
||||
this.store.updateState({ |
||||
threeBoxSyncingAllowed: newThreeboxSyncingState, |
||||
}); |
||||
|
||||
if (newThreeboxSyncingState && this.box) { |
||||
this.turnThreeBoxSyncingOn(); |
||||
} |
||||
|
||||
if (!newThreeboxSyncingState && this.box) { |
||||
this.turnThreeBoxSyncingOff(); |
||||
} |
||||
} |
||||
|
||||
getThreeBoxSyncingState() { |
||||
return this.store.getState().threeBoxSyncingAllowed; |
||||
} |
||||
|
||||
_registerUpdates() { |
||||
if (!this.registeringUpdates) { |
||||
const updatePreferences = this._update3Box.bind(this); |
||||
this.preferencesController.store.subscribe(updatePreferences); |
||||
const updateAddressBook = this._update3Box.bind(this); |
||||
this.addressBookController.subscribe(updateAddressBook); |
||||
this.registeringUpdates = true; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,79 @@ |
||||
import browser from 'webextension-polyfill'; |
||||
import LocalStore from './local-store'; |
||||
|
||||
jest.mock('webextension-polyfill', () => ({ |
||||
storage: { local: true }, |
||||
})); |
||||
|
||||
const setup = ({ isSupported }) => { |
||||
browser.storage.local = isSupported; |
||||
return new LocalStore(); |
||||
}; |
||||
describe('LocalStore', () => { |
||||
afterEach(() => { |
||||
jest.resetModules(); |
||||
}); |
||||
describe('contructor', () => { |
||||
it('should set isSupported property to false when browser does not support local storage', () => { |
||||
const localStore = setup({ isSupported: false }); |
||||
|
||||
expect(localStore.isSupported).toBe(false); |
||||
}); |
||||
|
||||
it('should set isSupported property to true when browser supports local storage', () => { |
||||
const localStore = setup({ isSupported: true }); |
||||
expect(localStore.isSupported).toBe(true); |
||||
}); |
||||
}); |
||||
|
||||
describe('setMetadata', () => { |
||||
it('should set the metadata property on LocalStore', () => { |
||||
const metadata = { version: 74 }; |
||||
const localStore = setup({ isSupported: true }); |
||||
localStore.setMetadata(metadata); |
||||
|
||||
expect(localStore.metadata).toStrictEqual(metadata); |
||||
}); |
||||
}); |
||||
|
||||
describe('set', () => { |
||||
it('should throw an error if called in a browser that does not support local storage', async () => { |
||||
const localStore = setup({ isSupported: false }); |
||||
await expect(() => localStore.set()).rejects.toThrow( |
||||
'Metamask- cannot persist state to local store as this browser does not support this action', |
||||
); |
||||
}); |
||||
|
||||
it('should throw an error if not passed a truthy value as an argument', async () => { |
||||
const localStore = setup({ isSupported: true }); |
||||
await expect(() => localStore.set()).rejects.toThrow( |
||||
'MetaMask - updated state is missing', |
||||
); |
||||
}); |
||||
|
||||
it('should throw an error if passed a valid argument but metadata has not yet been set', async () => { |
||||
const localStore = setup({ isSupported: true }); |
||||
await expect(() => |
||||
localStore.set({ appState: { test: true } }), |
||||
).rejects.toThrow( |
||||
'MetaMask - metadata must be set on instance of ExtensionStore before calling "set"', |
||||
); |
||||
}); |
||||
|
||||
it('should not throw if passed a valid argument and metadata has been set', async () => { |
||||
const localStore = setup({ isSupported: true }); |
||||
localStore.setMetadata({ version: 74 }); |
||||
await expect(async function () { |
||||
localStore.set({ appState: { test: true } }); |
||||
}).not.toThrow(); |
||||
}); |
||||
}); |
||||
|
||||
describe('get', () => { |
||||
it('should return undefined if called in a browser that does not support local storage', async () => { |
||||
const localStore = setup({ isSupported: false }); |
||||
const result = await localStore.get(); |
||||
expect(result).toStrictEqual(undefined); |
||||
}); |
||||
}); |
||||
}); |
@ -0,0 +1,275 @@ |
||||
import removeSlash from 'remove-trailing-slash'; |
||||
import looselyValidate from '@segment/loosely-validate-event'; |
||||
import { isString } from 'lodash'; |
||||
import isRetryAllowed from 'is-retry-allowed'; |
||||
|
||||
const noop = () => ({}); |
||||
|
||||
// Taken from https://stackoverflow.com/a/1349426/3696652
|
||||
const characters = |
||||
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; |
||||
const generateRandomId = () => { |
||||
let result = ''; |
||||
const charactersLength = characters.length; |
||||
for (let i = 0; i < 20; i++) { |
||||
result += characters.charAt(Math.floor(Math.random() * charactersLength)); |
||||
} |
||||
return result; |
||||
}; |
||||
|
||||
// Method below is inspired from axios-retry https://github.com/softonic/axios-retry
|
||||
function isNetworkError(error) { |
||||
return ( |
||||
!error.response && |
||||
Boolean(error.code) && // Prevents retrying cancelled requests
|
||||
error.code !== 'ECONNABORTED' && // Prevents retrying timed out requests
|
||||
isRetryAllowed(error) |
||||
); // Prevents retrying unsafe errors
|
||||
} |
||||
|
||||
export default class Analytics { |
||||
/** |
||||
* Initialize a new `Analytics` with Segment project's `writeKey` and an |
||||
* optional dictionary of `options`. |
||||
* |
||||
* @param {string} writeKey |
||||
* @param {object} [options] - (optional) |
||||
* @property {number} [flushAt] (default: 20) |
||||
* @property {number} [flushInterval] (default: 10000) |
||||
* @property {string} [host] (default: 'https://api.segment.io') |
||||
*/ |
||||
constructor(writeKey, options = {}) { |
||||
this.writeKey = writeKey; |
||||
|
||||
this.host = removeSlash(options.host || 'https://api.segment.io'); |
||||
this.flushInterval = options.flushInterval || 10000; |
||||
this.flushAt = options.flushAt || Math.max(options.flushAt, 1) || 20; |
||||
|
||||
this.queue = []; |
||||
this.path = '/v1/batch'; |
||||
this.maxQueueSize = 1024 * 450; |
||||
this.flushed = false; |
||||
this.retryCount = 3; |
||||
|
||||
Object.defineProperty(this, 'enable', { |
||||
configurable: false, |
||||
writable: false, |
||||
enumerable: true, |
||||
value: true, |
||||
}); |
||||
} |
||||
|
||||
_validate(message, type) { |
||||
looselyValidate(message, type); |
||||
} |
||||
|
||||
_message(type, message, callback) { |
||||
this._validate(message, type); |
||||
this.enqueue(type, message, callback); |
||||
return this; |
||||
} |
||||
|
||||
/** |
||||
* Send an identify `message`. |
||||
* |
||||
* @param {object} message |
||||
* @param {Function} [callback] - (optional) |
||||
* @returns {Analytics} |
||||
*/ |
||||
identify(message, callback) { |
||||
return this._message('identify', message, callback); |
||||
} |
||||
|
||||
/** |
||||
* Send a track `message`. |
||||
* |
||||
* @param {object} message |
||||
* @param {Function} [callback] - (optional) |
||||
* @returns {Analytics} |
||||
*/ |
||||
track(message, callback) { |
||||
return this._message('track', message, callback); |
||||
} |
||||
|
||||
/** |
||||
* Send a page `message`. |
||||
* |
||||
* @param {object} message |
||||
* @param {Function} [callback] - (optional) |
||||
* @returns {Analytics} |
||||
*/ |
||||
page(message, callback) { |
||||
return this._message('page', message, callback); |
||||
} |
||||
|
||||
/** |
||||
* Add a `message` of type `type` to the queue and |
||||
* check whether it should be flushed. |
||||
* |
||||
* @param {string} type |
||||
* @param {object} msg |
||||
* @param {Function} [callback] - (optional) |
||||
*/ |
||||
enqueue(type, msg, callback = noop) { |
||||
if (!this.enable) { |
||||
setImmediate(callback); |
||||
return; |
||||
} |
||||
|
||||
const message = { ...msg, type }; |
||||
|
||||
// Specifying library here helps segment to understand structure of request.
|
||||
// Currently segment seems to support these source libraries only.
|
||||
message.context = { |
||||
...message.context, |
||||
library: { |
||||
name: 'analytics-node', |
||||
}, |
||||
}; |
||||
|
||||
if (!message.timestamp) { |
||||
message.timestamp = new Date(); |
||||
} |
||||
|
||||
if (!message.messageId) { |
||||
message.messageId = generateRandomId(); |
||||
} |
||||
|
||||
if (message.anonymousId && !isString(message.anonymousId)) { |
||||
message.anonymousId = JSON.stringify(message.anonymousId); |
||||
} |
||||
if (message.userId && !isString(message.userId)) { |
||||
message.userId = JSON.stringify(message.userId); |
||||
} |
||||
this.queue.push({ message, callback }); |
||||
|
||||
if (!this.flushed) { |
||||
this.flushed = true; |
||||
this.flush(); |
||||
return; |
||||
} |
||||
|
||||
const hasReachedFlushAt = this.queue.length >= this.flushAt; |
||||
const hasReachedQueueSize = |
||||
this.queue.reduce((acc, item) => acc + JSON.stringify(item).length, 0) >= |
||||
this.maxQueueSize; |
||||
if (hasReachedFlushAt || hasReachedQueueSize) { |
||||
this.flush(); |
||||
} |
||||
|
||||
if (this.flushInterval && !this.timer) { |
||||
this.timer = setTimeout(this.flush.bind(this), this.flushInterval); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* Flush the current queue |
||||
* |
||||
* @param {Function} [callback] - (optional) |
||||
*/ |
||||
flush(callback = noop) { |
||||
if (!this.enable) { |
||||
setImmediate(callback); |
||||
return Promise.resolve(); |
||||
} |
||||
|
||||
if (this.timer) { |
||||
clearTimeout(this.timer); |
||||
this.timer = null; |
||||
} |
||||
|
||||
if (!this.queue.length) { |
||||
setImmediate(callback); |
||||
return Promise.resolve(); |
||||
} |
||||
|
||||
const items = this.queue.splice(0, this.flushAt); |
||||
const callbacks = items.map((item) => item.callback); |
||||
const messages = items.map((item) => item.message); |
||||
|
||||
const data = { |
||||
batch: messages, |
||||
timestamp: new Date(), |
||||
sentAt: new Date(), |
||||
}; |
||||
|
||||
const done = (err) => { |
||||
setImmediate(() => { |
||||
callbacks.forEach((fn) => fn(err, data)); |
||||
callback(err, data); |
||||
}); |
||||
}; |
||||
|
||||
const headers = { |
||||
Authorization: `Basic ${Buffer.from(this.writeKey, 'utf8').toString( |
||||
'base64', |
||||
)}`,
|
||||
}; |
||||
|
||||
return this._sendRequest( |
||||
`${this.host}${this.path}`, |
||||
{ |
||||
method: 'POST', |
||||
body: JSON.stringify(data), |
||||
headers, |
||||
}, |
||||
done, |
||||
0, |
||||
); |
||||
} |
||||
|
||||
_retryRequest(url, body, done, retryNo) { |
||||
const delay = Math.pow(2, retryNo) * 100; |
||||
setTimeout(() => { |
||||
this._sendRequest(url, body, done, retryNo + 1); |
||||
}, delay); |
||||
} |
||||
|
||||
async _sendRequest(url, body, done, retryNo) { |
||||
return fetch(url, body) |
||||
.then(async (response) => { |
||||
if (response.ok) { |
||||
done(); |
||||
} else if ( |
||||
this._isErrorRetryable({ response }) && |
||||
retryNo <= this.retryCount |
||||
) { |
||||
this._retryRequest(url, body, done, retryNo); |
||||
} else { |
||||
const error = new Error(response.statusText); |
||||
done(error); |
||||
} |
||||
}) |
||||
.catch((error) => { |
||||
if (this._isErrorRetryable(error) && retryNo <= this.retryCount) { |
||||
this._retryRequest(url, body, done, retryNo); |
||||
} else { |
||||
done(error); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
_isErrorRetryable(error) { |
||||
// Retry Network Errors.
|
||||
if (isNetworkError(error)) { |
||||
return true; |
||||
} |
||||
|
||||
if (!error.response) { |
||||
// Cannot determine if the request can be retried
|
||||
return false; |
||||
} |
||||
|
||||
// Retry Server Errors (5xx).
|
||||
if (error.response.status >= 500 && error.response.status <= 599) { |
||||
return true; |
||||
} |
||||
|
||||
// Retry if rate limited.
|
||||
if (error.response.status === 429) { |
||||
return true; |
||||
} |
||||
|
||||
return false; |
||||
} |
||||
} |
@ -0,0 +1,116 @@ |
||||
import Analytics from './analytics'; |
||||
|
||||
const DUMMY_KEY = 'DUMMY_KEY'; |
||||
const DUMMY_MESSAGE = { |
||||
userId: 'userId', |
||||
idValue: 'idValue', |
||||
event: 'event', |
||||
}; |
||||
const FLUSH_INTERVAL = 10000; |
||||
|
||||
global.setImmediate = (arg) => { |
||||
arg(); |
||||
}; |
||||
|
||||
global.fetch = () => |
||||
Promise.resolve({ |
||||
ok: true, |
||||
json: () => Promise.resolve({ success: true }), |
||||
}); |
||||
|
||||
describe('Analytics', function () { |
||||
let analytics; |
||||
|
||||
beforeEach(() => { |
||||
analytics = new Analytics(DUMMY_KEY); |
||||
}); |
||||
|
||||
describe('#flush', function () { |
||||
it('first message is immediately flushed', function () { |
||||
const mock = jest.fn(analytics.flush); |
||||
analytics.flush = mock; |
||||
analytics.track(DUMMY_MESSAGE); |
||||
expect(analytics.queue).toHaveLength(0); |
||||
expect(mock).toHaveBeenCalledTimes(1); |
||||
}); |
||||
|
||||
it('after first message it is called when queue size equals flushAt value', function () { |
||||
analytics = new Analytics(DUMMY_KEY, { flushAt: 3 }); |
||||
const mock = jest.fn(analytics.flush); |
||||
analytics.flush = mock; |
||||
analytics.track(DUMMY_MESSAGE); |
||||
analytics.track(DUMMY_MESSAGE); |
||||
analytics.track(DUMMY_MESSAGE); |
||||
analytics.track(DUMMY_MESSAGE); |
||||
expect(analytics.queue).toHaveLength(0); |
||||
expect(mock).toHaveBeenCalledTimes(2); |
||||
}); |
||||
|
||||
it('except for first message it is called until queue size is less than flushAt value', function () { |
||||
analytics = new Analytics(DUMMY_KEY, { flushAt: 3 }); |
||||
const mock = jest.fn(analytics.flush); |
||||
analytics.flush = mock; |
||||
analytics.track(DUMMY_MESSAGE); |
||||
analytics.track(DUMMY_MESSAGE); |
||||
analytics.track(DUMMY_MESSAGE); |
||||
expect(analytics.queue).toHaveLength(2); |
||||
expect(mock).toHaveBeenCalledTimes(1); |
||||
}); |
||||
|
||||
it('after first message it is called after flushInterval is elapsed', function () { |
||||
jest.useFakeTimers(); |
||||
analytics = new Analytics(DUMMY_KEY, { flushInterval: FLUSH_INTERVAL }); |
||||
const mock = jest.fn(analytics.flush); |
||||
analytics.flush = mock; |
||||
analytics.track(DUMMY_MESSAGE); |
||||
analytics.track(DUMMY_MESSAGE); |
||||
jest.advanceTimersByTime(FLUSH_INTERVAL); |
||||
expect(analytics.queue).toHaveLength(0); |
||||
expect(mock).toHaveBeenCalledTimes(2); |
||||
}); |
||||
|
||||
it('after first message it is not called until flushInterval is elapsed', function () { |
||||
jest.useFakeTimers(); |
||||
analytics = new Analytics(DUMMY_KEY, { flushInterval: FLUSH_INTERVAL }); |
||||
const mock = jest.fn(analytics.flush); |
||||
analytics.flush = mock; |
||||
analytics.track(DUMMY_MESSAGE); |
||||
analytics.track(DUMMY_MESSAGE); |
||||
jest.advanceTimersByTime(FLUSH_INTERVAL - 100); |
||||
expect(analytics.queue).toHaveLength(1); |
||||
expect(mock).toHaveBeenCalledTimes(1); |
||||
}); |
||||
|
||||
it('invokes callbacks', async function () { |
||||
const callback = jest.fn(); |
||||
analytics.track(DUMMY_MESSAGE); |
||||
analytics.track(DUMMY_MESSAGE, callback); |
||||
await analytics.flush(); |
||||
expect(callback).toHaveBeenCalledTimes(1); |
||||
}); |
||||
}); |
||||
|
||||
describe('#track', function () { |
||||
it('adds messages to ququq', function () { |
||||
analytics.track(DUMMY_MESSAGE); |
||||
analytics.track(DUMMY_MESSAGE); |
||||
expect(analytics.queue).toHaveLength(1); |
||||
}); |
||||
}); |
||||
|
||||
describe('#page', function () { |
||||
it('adds messages to ququq', function () { |
||||
analytics.page(DUMMY_MESSAGE); |
||||
analytics.page(DUMMY_MESSAGE); |
||||
expect(analytics.queue).toHaveLength(1); |
||||
}); |
||||
}); |
||||
|
||||
describe('#identify', function () { |
||||
it('adds messages to ququq', function () { |
||||
analytics.identify(DUMMY_MESSAGE); |
||||
analytics.identify(DUMMY_MESSAGE); |
||||
expect(analytics.queue).toHaveLength(1); |
||||
}); |
||||
}); |
||||
}); |
@ -1,5 +1,5 @@ |
||||
import Analytics from 'analytics-node'; |
||||
import { SECOND } from '../../../shared/constants/time'; |
||||
import { SECOND } from '../../../../shared/constants/time'; |
||||
import Analytics from './analytics'; |
||||
|
||||
const SEGMENT_WRITE_KEY = process.env.SEGMENT_WRITE_KEY ?? null; |
||||
const SEGMENT_HOST = process.env.SEGMENT_HOST ?? null; |
@ -0,0 +1,23 @@ |
||||
import { cloneDeep } from 'lodash'; |
||||
|
||||
const version = 75; |
||||
|
||||
/** |
||||
* Delete the ThreeBoxController. |
||||
*/ |
||||
export default { |
||||
version, |
||||
async migrate(originalVersionedData) { |
||||
const versionedData = cloneDeep(originalVersionedData); |
||||
versionedData.meta.version = version; |
||||
const state = versionedData.data; |
||||
const newState = transformState(state); |
||||
versionedData.data = newState; |
||||
return versionedData; |
||||
}, |
||||
}; |
||||
|
||||
function transformState(state) { |
||||
delete state.ThreeBoxController; |
||||
return state; |
||||
} |
@ -0,0 +1,63 @@ |
||||
import migration75 from './075'; |
||||
|
||||
describe('migration #75', () => { |
||||
it('should update the version metadata', async () => { |
||||
const oldStorage = { |
||||
meta: { |
||||
version: 74, |
||||
}, |
||||
data: {}, |
||||
}; |
||||
|
||||
const newStorage = await migration75.migrate(oldStorage); |
||||
expect(newStorage.meta).toStrictEqual({ |
||||
version: 75, |
||||
}); |
||||
}); |
||||
|
||||
it('should delete the ThreeBoxController', async () => { |
||||
const oldStorage = { |
||||
meta: { |
||||
version: 74, |
||||
}, |
||||
data: { |
||||
FooController: { a: 'b' }, |
||||
ThreeBoxController: { |
||||
stuff: 'stuff!', |
||||
moreStuff: { moreStuff: ['stuff', 'stuff', 'stuff'] }, |
||||
}, |
||||
}, |
||||
}; |
||||
|
||||
const newStorage = await migration75.migrate(oldStorage); |
||||
expect(newStorage).toStrictEqual({ |
||||
meta: { |
||||
version: 75, |
||||
}, |
||||
data: { |
||||
FooController: { a: 'b' }, |
||||
}, |
||||
}); |
||||
}); |
||||
|
||||
it('should handle missing ThreeBoxController', async () => { |
||||
const oldStorage = { |
||||
meta: { |
||||
version: 74, |
||||
}, |
||||
data: { |
||||
FooController: { a: 'b' }, |
||||
}, |
||||
}; |
||||
|
||||
const newStorage = await migration75.migrate(oldStorage); |
||||
expect(newStorage).toStrictEqual({ |
||||
meta: { |
||||
version: 75, |
||||
}, |
||||
data: { |
||||
FooController: { a: 'b' }, |
||||
}, |
||||
}); |
||||
}); |
||||
}); |
@ -1,68 +0,0 @@ |
||||
function delay(time) { |
||||
return new Promise((resolve) => setTimeout(resolve, time)); |
||||
} |
||||
|
||||
async function loadFromMock3Box(key) { |
||||
const res = await window.fetch(`http://localhost:8889?key=${key}`); |
||||
const text = await res.text(); |
||||
return text.length ? JSON.parse(text) : null; |
||||
} |
||||
|
||||
async function saveToMock3Box(key, newDataAtKey) { |
||||
const res = await window.fetch('http://localhost:8889', { |
||||
method: 'POST', |
||||
body: JSON.stringify({ |
||||
key, |
||||
data: newDataAtKey, |
||||
}), |
||||
}); |
||||
|
||||
return res.text(); |
||||
} |
||||
|
||||
class Mock3Box { |
||||
static openBox(address) { |
||||
this.address = address; |
||||
return Promise.resolve({ |
||||
onSyncDone: (cb) => { |
||||
setTimeout(cb, 200); |
||||
}, |
||||
openSpace: async (spaceName, config) => { |
||||
const { onSyncDone } = config; |
||||
this.spaceName = spaceName; |
||||
|
||||
setTimeout(onSyncDone, 150); |
||||
|
||||
await delay(50); |
||||
|
||||
return { |
||||
private: { |
||||
get: async (key) => { |
||||
await delay(50); |
||||
const res = await loadFromMock3Box( |
||||
`${this.address}-${this.spaceName}-${key}`, |
||||
); |
||||
return res; |
||||
}, |
||||
set: async (key, data) => { |
||||
await saveToMock3Box( |
||||
`${this.address}-${this.spaceName}-${key}`, |
||||
data, |
||||
); |
||||
await delay(50); |
||||
return null; |
||||
}, |
||||
}, |
||||
}; |
||||
}, |
||||
logout: () => undefined, |
||||
}); |
||||
} |
||||
|
||||
static async getConfig(address) { |
||||
const backup = await loadFromMock3Box(`${address}-metamask-metamaskBackup`); |
||||
return backup ? { spaces: { metamask: {} } } : {}; |
||||
} |
||||
} |
||||
|
||||
module.exports = Mock3Box; |
@ -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: |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,37 +0,0 @@ |
||||
lazy precompute for faster module initialization
|
||||
|
||||
diff --git a/node_modules/secp256k1/lib/js/ecpointg.js b/node_modules/secp256k1/lib/js/ecpointg.js
|
||||
index 0144364..09a87c5 100644
|
||||
--- a/node_modules/secp256k1/lib/js/ecpointg.js
|
||||
+++ b/node_modules/secp256k1/lib/js/ecpointg.js
|
||||
@@ -8,11 +8,12 @@ function ECPointG () {
|
||||
this.x = BN.fromBuffer(Buffer.from('79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798', 'hex'))
|
||||
this.y = BN.fromBuffer(Buffer.from('483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8', 'hex'))
|
||||
this.inf = false
|
||||
-
|
||||
- this._precompute()
|
||||
+ this.precomputed = undefined
|
||||
}
|
||||
|
||||
ECPointG.prototype._precompute = function () {
|
||||
+ if (this.precomputed !== undefined) return
|
||||
+
|
||||
var ecpoint = new ECPoint(this.x, this.y)
|
||||
|
||||
var dstep = 4
|
||||
@@ -34,6 +35,7 @@ ECPointG.prototype._precompute = function () {
|
||||
}
|
||||
|
||||
ECPointG.prototype.mul = function (num) {
|
||||
+ this._precompute()
|
||||
// Algorithm 3.42 Fixed-base NAF windowing method for point multiplication
|
||||
var step = this.precomputed.doubles.step
|
||||
var points = this.precomputed.doubles.points
|
||||
@@ -68,6 +70,7 @@ ECPointG.prototype.mul = function (num) {
|
||||
}
|
||||
|
||||
ECPointG.prototype.mulAdd = function (k1, p2, k2) {
|
||||
+ this._precompute()
|
||||
var nafPointsP1 = this.precomputed.naf
|
||||
var nafPointsP2 = p2._getNAFPoints1()
|
||||
var wnd = [nafPointsP1.points, nafPointsP2.points]
|
@ -1 +1,3 @@ |
||||
export const AUTO_LOCK_TIMEOUT_ALARM = 'AUTO_LOCK_TIMEOUT_ALARM'; |
||||
export const METAMETRICS_FINALIZE_EVENT_FRAGMENT_ALARM = |
||||
'METAMETRICS_FINALIZE_EVENT_FRAGMENT_ALARM'; |
||||
|
File diff suppressed because it is too large
Load Diff
@ -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 |
||||
} |
||||
} |
@ -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 |
||||
} |
||||
} |
@ -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 |
||||
} |
||||
} |
@ -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 |
||||
} |
||||
} |
@ -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 |
||||
} |
||||
} |
@ -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 |
||||
} |
||||
} |
@ -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 |
||||
} |
||||
} |
@ -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 |
||||
} |
||||
} |
@ -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 |
||||
} |
||||
} |
@ -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 |
||||
} |
||||
} |
@ -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 |
||||
} |
||||
} |
@ -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 |
||||
} |
||||
} |
@ -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 |
||||
} |
||||
} |
@ -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 |
||||
} |
||||
} |
@ -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 |
||||
} |
||||
} |
@ -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 |
||||
} |
||||
} |
@ -1,57 +0,0 @@ |
||||
const http = require('http'); |
||||
|
||||
const PORT = 8889; |
||||
|
||||
class ThreeboxMockServer { |
||||
constructor() { |
||||
this.server = http.createServer(this.requestHandler); |
||||
this.database = {}; |
||||
} |
||||
|
||||
async start() { |
||||
return new Promise((resolve, reject) => { |
||||
this.server = this.server.listen(PORT); |
||||
this.server.once('error', reject); |
||||
this.server.once('listening', resolve); |
||||
}); |
||||
} |
||||
|
||||
async stop() { |
||||
if (!this.server) { |
||||
return; |
||||
} |
||||
|
||||
await new Promise((resolve, reject) => { |
||||
this.server.close(); |
||||
this.server.once('error', reject); |
||||
this.server.once('close', resolve); |
||||
}); |
||||
} |
||||
|
||||
requestHandler = (request, response) => { |
||||
response.setHeader('Content-Type', 'application/json'); |
||||
if (request.method === 'POST') { |
||||
let body = ''; |
||||
request.on('data', (chunk) => { |
||||
body += chunk.toString(); // convert Buffer to string
|
||||
}); |
||||
request.on('end', () => { |
||||
const { key, data } = JSON.parse(body); |
||||
this.database[key] = data; |
||||
response.setHeader('Access-Control-Allow-Headers', '*'); |
||||
response.end('ok'); |
||||
}); |
||||
} else if (request.method === 'GET') { |
||||
const key = new URL(request.url, 'https://example.org/').searchParams.get( |
||||
'key', |
||||
); |
||||
|
||||
response.setHeader('Access-Control-Allow-Headers', '*'); |
||||
response.end(JSON.stringify(this.database[key] || '')); |
||||
} else { |
||||
response.end('unknown request'); |
||||
} |
||||
}; |
||||
} |
||||
|
||||
module.exports = ThreeboxMockServer; |
@ -0,0 +1,50 @@ |
||||
{ |
||||
"addressBook": { |
||||
"addressBook": { |
||||
"0x539": { |
||||
"0x0c54FcCd2e384b4BB6f2E405Bf5Cbc15a017AaFb": { |
||||
"address": "0x0c54FcCd2e384b4BB6f2E405Bf5Cbc15a017AaFb", |
||||
"chainId": "0x539", |
||||
"isEns": false, |
||||
"memo": "", |
||||
"name": "Test Account" |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
"preferences": { |
||||
"advancedGasFee": null, |
||||
"currentLocale": "en", |
||||
"dismissSeedBackUpReminder": true, |
||||
"featureFlags": { |
||||
"showIncomingTransactions": true |
||||
}, |
||||
"forgottenPassword": false, |
||||
"frequentRpcListDetail": [ |
||||
{ |
||||
"chainId": "0x539", |
||||
"nickname": "Localhost 8545", |
||||
"rpcPrefs": {}, |
||||
"rpcUrl": "http://localhost:8545", |
||||
"ticker": "ETH" |
||||
} |
||||
], |
||||
"infuraBlocked": false, |
||||
"ipfsGateway": "dweb.link", |
||||
"knownMethodData": {}, |
||||
"ledgerTransportType": "webhid", |
||||
"openSeaEnabled": false, |
||||
"preferences": { |
||||
"hideZeroBalanceTokens": false, |
||||
"showFiatInTestnets": false, |
||||
"showTestNetworks": false, |
||||
"useNativeCurrencyAsPrimaryCurrency": true |
||||
}, |
||||
"theme": "light", |
||||
"useBlockie": false, |
||||
"useCollectibleDetection": false, |
||||
"useNonceField": false, |
||||
"usePhishDetect": true, |
||||
"useTokenDetection": false |
||||
} |
||||
} |
@ -1,3 +1,3 @@ |
||||
module.exports = { |
||||
TEST_SNAPS_WEBSITE_URL: 'https://metamask.github.io/test-snaps/3.0.1', |
||||
TEST_SNAPS_WEBSITE_URL: 'https://metamask.github.io/test-snaps/3.1.0', |
||||
}; |
||||
|
@ -0,0 +1,157 @@ |
||||
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 () { |
||||
it('tests various functions of bip-32', async function () { |
||||
const ganacheOptions = { |
||||
accounts: [ |
||||
{ |
||||
secretKey: |
||||
'0x7C9529A67102755B7E6102D6D950AC5D5863C98713805CEC576B945B15B71EAC', |
||||
}, |
||||
], |
||||
}; |
||||
await withFixtures( |
||||
{ |
||||
fixtures: new FixtureBuilder() |
||||
.withPermissionControllerConnectedToSnapDapp() |
||||
.build(), |
||||
ganacheOptions, |
||||
title: this.test.title, |
||||
}, |
||||
async ({ driver }) => { |
||||
await driver.navigate(); |
||||
|
||||
// enter pw into extension
|
||||
await driver.fill('#password', 'correct horse battery staple'); |
||||
await driver.press('#password', driver.Key.ENTER); |
||||
|
||||
// navigate to test snaps page and connect
|
||||
await driver.driver.get(TEST_SNAPS_WEBSITE_URL); |
||||
await driver.delay(1000); |
||||
|
||||
// find and scroll to the correct card and click first
|
||||
const snapButton = await driver.findElement('#sendUpdateHello'); |
||||
await driver.scrollToElement(snapButton); |
||||
await driver.delay(500); |
||||
await driver.fill('#snapId6', 'npm:@metamask/test-snap-bip32'); |
||||
await driver.clickElement('#connectBip32'); |
||||
|
||||
// approve install of snap
|
||||
await driver.waitUntilXWindowHandles(2, 5000, 10000); |
||||
let windowHandles = await driver.getAllWindowHandles(); |
||||
await driver.switchToWindowWithTitle( |
||||
'MetaMask Notification', |
||||
windowHandles, |
||||
); |
||||
await driver.clickElement({ |
||||
text: 'Approve & install', |
||||
tag: 'button', |
||||
}); |
||||
|
||||
// wait for permissions popover, click checkboxes and confirm
|
||||
await driver.delay(1000); |
||||
await driver.clickElement('#key-access-bip32-m-44h-0h-secp256k1-0'); |
||||
await driver.clickElement('#key-access-bip32-m-44h-0h-ed25519-0'); |
||||
await driver.clickElement({ |
||||
text: 'Confirm', |
||||
tag: 'button', |
||||
}); |
||||
|
||||
// switch back to test-snaps window
|
||||
await driver.waitUntilXWindowHandles(1, 5000, 10000); |
||||
windowHandles = await driver.getAllWindowHandles(); |
||||
await driver.switchToWindowWithTitle('Test Snaps', windowHandles); |
||||
|
||||
// wait then run SECP256K1 test
|
||||
await driver.delay(1000); |
||||
await driver.fill('#bip32SignMessage', 'foo bar'); |
||||
await driver.clickElement('#sendBip32Secp256k1'); |
||||
|
||||
// hit 'approve' on the custom confirm
|
||||
await driver.waitUntilXWindowHandles(2, 5000, 10000); |
||||
windowHandles = await driver.getAllWindowHandles(); |
||||
await driver.switchToWindowWithTitle( |
||||
'MetaMask Notification', |
||||
windowHandles, |
||||
); |
||||
await driver.clickElement({ |
||||
text: 'Approve', |
||||
tag: 'button', |
||||
}); |
||||
|
||||
await driver.waitUntilXWindowHandles(1, 5000, 10000); |
||||
windowHandles = await driver.getAllWindowHandles(); |
||||
await driver.switchToWindowWithTitle('Test Snaps', windowHandles); |
||||
|
||||
// check result
|
||||
await driver.delay(1000); |
||||
const secp256k1Result = await driver.findElement( |
||||
'#bip32Secp256k1Result', |
||||
); |
||||
assert.equal( |
||||
await secp256k1Result.getText(), |
||||
'Signature: "0xd30561eb9e3195e47d49198fb0bc66eda867a7dff4c5e8b60c2ec13851aa7d8cc3d485da177de63dad331f315d440cbb693a629efe228389c4693ea90465b101"', |
||||
); |
||||
|
||||
// wait then run ed25519 test
|
||||
await driver.delay(1000); |
||||
await driver.clickElement('#sendBip32Ed25519'); |
||||
|
||||
// hit 'approve' on the custom confirm
|
||||
await driver.waitUntilXWindowHandles(2, 5000, 10000); |
||||
windowHandles = await driver.getAllWindowHandles(); |
||||
await driver.switchToWindowWithTitle( |
||||
'MetaMask Notification', |
||||
windowHandles, |
||||
); |
||||
await driver.clickElement({ |
||||
text: 'Approve', |
||||
tag: 'button', |
||||
}); |
||||
|
||||
await driver.waitUntilXWindowHandles(1, 5000, 10000); |
||||
windowHandles = await driver.getAllWindowHandles(); |
||||
await driver.switchToWindowWithTitle('Test Snaps', windowHandles); |
||||
|
||||
// check result
|
||||
await driver.delay(1000); |
||||
const ed25519Result = await driver.findElement('#bip32Ed25519Result'); |
||||
assert.equal( |
||||
await ed25519Result.getText(), |
||||
'Signature: "0xf3215b4d6c59aac7e01b4ceef530d1e2abf4857926b85a81aaae3894505699243768a887b7da4a8c2e0f25196196ba290b6531050db8dc15c252bdd508532a0a"', |
||||
); |
||||
|
||||
const publicKeyButton = await driver.findElement('#sendBip32PublicKey'); |
||||
await driver.scrollToElement(publicKeyButton); |
||||
// wait then run public key test
|
||||
await driver.delay(1000); |
||||
await driver.clickElement('#sendBip32PublicKey'); |
||||
// check result
|
||||
await driver.delay(1000); |
||||
const publicKeyResult = await driver.findElement( |
||||
'#bip32PublicKeyResult', |
||||
); |
||||
assert.equal( |
||||
await publicKeyResult.getText(), |
||||
'Public key: "043e98d696ae15caef75fa8dd204a7c5c08d1272b2218ba3c20feeb4c691eec366606ece56791c361a2320e7fad8bcbb130f66d51c591fc39767ab2856e93f8dfb"', |
||||
); |
||||
|
||||
// wait then run compressed public key test
|
||||
await driver.delay(1000); |
||||
await driver.clickElement('#sendBip32CompressedPublicKey'); |
||||
// check result
|
||||
await driver.delay(1000); |
||||
const compressedPublicKeyResult = await driver.findElement( |
||||
'#bip32CompressedPublicKeyResult', |
||||
); |
||||
assert.equal( |
||||
await compressedPublicKeyResult.getText(), |
||||
'Public key: "033e98d696ae15caef75fa8dd204a7c5c08d1272b2218ba3c20feeb4c691eec366"', |
||||
); |
||||
}, |
||||
); |
||||
}); |
||||
}); |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue