Merge pull request #9021 from MetaMask/Version-v8.0.5
Version v8.0.5 RCfeature/default_network_editable
@ -1,9 +1,9 @@ |
|||||||
app/ |
/app |
||||||
development/ |
/development |
||||||
dist/ |
/dist |
||||||
docs/ |
/docs |
||||||
fonts/ |
/fonts |
||||||
images/ |
/images |
||||||
node_modules/ |
/node_modules |
||||||
notices/ |
/notices |
||||||
test/ |
/test |
||||||
|
@ -1,50 +0,0 @@ |
|||||||
{ |
|
||||||
"extends": "stylelint-config-standard", |
|
||||||
"rules": { |
|
||||||
"color-named": "never", |
|
||||||
"font-family-name-quotes": "always-where-recommended", |
|
||||||
"font-weight-notation": "numeric", |
|
||||||
"function-url-quotes": "always", |
|
||||||
"number-leading-zero": "never", |
|
||||||
"value-no-vendor-prefix": true, |
|
||||||
"value-list-comma-newline-before": "never-multi-line", |
|
||||||
"custom-property-empty-line-before": "never", |
|
||||||
"property-no-unknown": [ |
|
||||||
true, |
|
||||||
{ |
|
||||||
"ignoreProperties": [ |
|
||||||
"composes", |
|
||||||
"all", |
|
||||||
"-webkit-appearance" |
|
||||||
] |
|
||||||
} |
|
||||||
], |
|
||||||
"declaration-block-semicolon-newline-after": "always", |
|
||||||
"block-opening-brace-newline-after": "always", |
|
||||||
"selector-attribute-quotes": "always", |
|
||||||
"selector-max-specificity": "0,5,2", |
|
||||||
"selector-pseudo-class-no-unknown": [ |
|
||||||
true, |
|
||||||
{ |
|
||||||
"ignorePseudoClasses": ["local", "global"] |
|
||||||
} |
|
||||||
], |
|
||||||
"at-rule-empty-line-before": [ |
|
||||||
"always", |
|
||||||
{ |
|
||||||
"ignore": [ |
|
||||||
"after-comment" |
|
||||||
] |
|
||||||
} |
|
||||||
], |
|
||||||
"indentation": [ |
|
||||||
2, |
|
||||||
{ |
|
||||||
"indentInsideParens": "once-at-root-twice-in-block" |
|
||||||
} |
|
||||||
], |
|
||||||
"max-nesting-depth": 3, |
|
||||||
"no-duplicate-selectors": true, |
|
||||||
"no-unknown-animations": true |
|
||||||
} |
|
||||||
} |
|
@ -1,93 +0,0 @@ |
|||||||
Copyright (c) 2010-2014 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato" |
|
||||||
|
|
||||||
This Font Software is licensed under the SIL Open Font License, Version 1.1. |
|
||||||
This license is copied below, and is also available with a FAQ at: |
|
||||||
http://scripts.sil.org/OFL |
|
||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------- |
|
||||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 |
|
||||||
----------------------------------------------------------- |
|
||||||
|
|
||||||
PREAMBLE |
|
||||||
The goals of the Open Font License (OFL) are to stimulate worldwide |
|
||||||
development of collaborative font projects, to support the font creation |
|
||||||
efforts of academic and linguistic communities, and to provide a free and |
|
||||||
open framework in which fonts may be shared and improved in partnership |
|
||||||
with others. |
|
||||||
|
|
||||||
The OFL allows the licensed fonts to be used, studied, modified and |
|
||||||
redistributed freely as long as they are not sold by themselves. The |
|
||||||
fonts, including any derivative works, can be bundled, embedded, |
|
||||||
redistributed and/or sold with any software provided that any reserved |
|
||||||
names are not used by derivative works. The fonts and derivatives, |
|
||||||
however, cannot be released under any other type of license. The |
|
||||||
requirement for fonts to remain under this license does not apply |
|
||||||
to any document created using the fonts or their derivatives. |
|
||||||
|
|
||||||
DEFINITIONS |
|
||||||
"Font Software" refers to the set of files released by the Copyright |
|
||||||
Holder(s) under this license and clearly marked as such. This may |
|
||||||
include source files, build scripts and documentation. |
|
||||||
|
|
||||||
"Reserved Font Name" refers to any names specified as such after the |
|
||||||
copyright statement(s). |
|
||||||
|
|
||||||
"Original Version" refers to the collection of Font Software components as |
|
||||||
distributed by the Copyright Holder(s). |
|
||||||
|
|
||||||
"Modified Version" refers to any derivative made by adding to, deleting, |
|
||||||
or substituting -- in part or in whole -- any of the components of the |
|
||||||
Original Version, by changing formats or by porting the Font Software to a |
|
||||||
new environment. |
|
||||||
|
|
||||||
"Author" refers to any designer, engineer, programmer, technical |
|
||||||
writer or other person who contributed to the Font Software. |
|
||||||
|
|
||||||
PERMISSION & CONDITIONS |
|
||||||
Permission is hereby granted, free of charge, to any person obtaining |
|
||||||
a copy of the Font Software, to use, study, copy, merge, embed, modify, |
|
||||||
redistribute, and sell modified and unmodified copies of the Font |
|
||||||
Software, subject to the following conditions: |
|
||||||
|
|
||||||
1) Neither the Font Software nor any of its individual components, |
|
||||||
in Original or Modified Versions, may be sold by itself. |
|
||||||
|
|
||||||
2) Original or Modified Versions of the Font Software may be bundled, |
|
||||||
redistributed and/or sold with any software, provided that each copy |
|
||||||
contains the above copyright notice and this license. These can be |
|
||||||
included either as stand-alone text files, human-readable headers or |
|
||||||
in the appropriate machine-readable metadata fields within text or |
|
||||||
binary files as long as those fields can be easily viewed by the user. |
|
||||||
|
|
||||||
3) No Modified Version of the Font Software may use the Reserved Font |
|
||||||
Name(s) unless explicit written permission is granted by the corresponding |
|
||||||
Copyright Holder. This restriction only applies to the primary font name as |
|
||||||
presented to the users. |
|
||||||
|
|
||||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font |
|
||||||
Software shall not be used to promote, endorse or advertise any |
|
||||||
Modified Version, except to acknowledge the contribution(s) of the |
|
||||||
Copyright Holder(s) and the Author(s) or with their explicit written |
|
||||||
permission. |
|
||||||
|
|
||||||
5) The Font Software, modified or unmodified, in part or in whole, |
|
||||||
must be distributed entirely under this license, and must not be |
|
||||||
distributed under any other license. The requirement for fonts to |
|
||||||
remain under this license does not apply to any document created |
|
||||||
using the Font Software. |
|
||||||
|
|
||||||
TERMINATION |
|
||||||
This license becomes null and void if any of the above conditions are |
|
||||||
not met. |
|
||||||
|
|
||||||
DISCLAIMER |
|
||||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF |
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT |
|
||||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE |
|
||||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL |
|
||||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
||||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM |
|
||||||
OTHER DEALINGS IN THE FONT SOFTWARE. |
|
@ -1,92 +0,0 @@ |
|||||||
Copyright (c) 2011-2012, Julieta Ulanovsky (julieta.ulanovsky@gmail.com), with Reserved Font Names 'Montserrat' |
|
||||||
This Font Software is licensed under the SIL Open Font License, Version 1.1. |
|
||||||
This license is copied below, and is also available with a FAQ at: |
|
||||||
http://scripts.sil.org/OFL |
|
||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------- |
|
||||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 |
|
||||||
----------------------------------------------------------- |
|
||||||
|
|
||||||
PREAMBLE |
|
||||||
The goals of the Open Font License (OFL) are to stimulate worldwide |
|
||||||
development of collaborative font projects, to support the font creation |
|
||||||
efforts of academic and linguistic communities, and to provide a free and |
|
||||||
open framework in which fonts may be shared and improved in partnership |
|
||||||
with others. |
|
||||||
|
|
||||||
The OFL allows the licensed fonts to be used, studied, modified and |
|
||||||
redistributed freely as long as they are not sold by themselves. The |
|
||||||
fonts, including any derivative works, can be bundled, embedded, |
|
||||||
redistributed and/or sold with any software provided that any reserved |
|
||||||
names are not used by derivative works. The fonts and derivatives, |
|
||||||
however, cannot be released under any other type of license. The |
|
||||||
requirement for fonts to remain under this license does not apply |
|
||||||
to any document created using the fonts or their derivatives. |
|
||||||
|
|
||||||
DEFINITIONS |
|
||||||
"Font Software" refers to the set of files released by the Copyright |
|
||||||
Holder(s) under this license and clearly marked as such. This may |
|
||||||
include source files, build scripts and documentation. |
|
||||||
|
|
||||||
"Reserved Font Name" refers to any names specified as such after the |
|
||||||
copyright statement(s). |
|
||||||
|
|
||||||
"Original Version" refers to the collection of Font Software components as |
|
||||||
distributed by the Copyright Holder(s). |
|
||||||
|
|
||||||
"Modified Version" refers to any derivative made by adding to, deleting, |
|
||||||
or substituting -- in part or in whole -- any of the components of the |
|
||||||
Original Version, by changing formats or by porting the Font Software to a |
|
||||||
new environment. |
|
||||||
|
|
||||||
"Author" refers to any designer, engineer, programmer, technical |
|
||||||
writer or other person who contributed to the Font Software. |
|
||||||
|
|
||||||
PERMISSION & CONDITIONS |
|
||||||
Permission is hereby granted, free of charge, to any person obtaining |
|
||||||
a copy of the Font Software, to use, study, copy, merge, embed, modify, |
|
||||||
redistribute, and sell modified and unmodified copies of the Font |
|
||||||
Software, subject to the following conditions: |
|
||||||
|
|
||||||
1) Neither the Font Software nor any of its individual components, |
|
||||||
in Original or Modified Versions, may be sold by itself. |
|
||||||
|
|
||||||
2) Original or Modified Versions of the Font Software may be bundled, |
|
||||||
redistributed and/or sold with any software, provided that each copy |
|
||||||
contains the above copyright notice and this license. These can be |
|
||||||
included either as stand-alone text files, human-readable headers or |
|
||||||
in the appropriate machine-readable metadata fields within text or |
|
||||||
binary files as long as those fields can be easily viewed by the user. |
|
||||||
|
|
||||||
3) No Modified Version of the Font Software may use the Reserved Font |
|
||||||
Name(s) unless explicit written permission is granted by the corresponding |
|
||||||
Copyright Holder. This restriction only applies to the primary font name as |
|
||||||
presented to the users. |
|
||||||
|
|
||||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font |
|
||||||
Software shall not be used to promote, endorse or advertise any |
|
||||||
Modified Version, except to acknowledge the contribution(s) of the |
|
||||||
Copyright Holder(s) and the Author(s) or with their explicit written |
|
||||||
permission. |
|
||||||
|
|
||||||
5) The Font Software, modified or unmodified, in part or in whole, |
|
||||||
must be distributed entirely under this license, and must not be |
|
||||||
distributed under any other license. The requirement for fonts to |
|
||||||
remain under this license does not apply to any document created |
|
||||||
using the Font Software. |
|
||||||
|
|
||||||
TERMINATION |
|
||||||
This license becomes null and void if any of the above conditions are |
|
||||||
not met. |
|
||||||
|
|
||||||
DISCLAIMER |
|
||||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF |
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT |
|
||||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE |
|
||||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL |
|
||||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
||||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM |
|
||||||
OTHER DEALINGS IN THE FONT SOFTWARE. |
|
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 421 B |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 12 KiB |
@ -1,19 +0,0 @@ |
|||||||
import blocklist from './recipient-blocklist' |
|
||||||
|
|
||||||
/** |
|
||||||
* Checks if a specified account on a specified network is blocked |
|
||||||
* @param {number} networkId |
|
||||||
* @param {string} account |
|
||||||
* @throws {Error} if the account is blocked on mainnet |
|
||||||
*/ |
|
||||||
export function throwIfAccountIsBlocked (networkId, account) { |
|
||||||
const mainnetId = 1 |
|
||||||
if (networkId !== mainnetId) { |
|
||||||
return |
|
||||||
} |
|
||||||
|
|
||||||
const accountToCheck = account.toLowerCase() |
|
||||||
if (blocklist.includes(accountToCheck)) { |
|
||||||
throw new Error('Recipient is a public account') |
|
||||||
} |
|
||||||
} |
|
@ -1,17 +0,0 @@ |
|||||||
const blocklist = [ |
|
||||||
// IDEX phisher
|
|
||||||
'0x9bcb0A9d99d815Bb87ee3191b1399b1Bcc46dc77', |
|
||||||
// Ganache default seed phrases
|
|
||||||
'0x627306090abab3a6e1400e9345bc60c78a8bef57', |
|
||||||
'0xf17f52151ebef6c7334fad080c5704d77216b732', |
|
||||||
'0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef', |
|
||||||
'0x821aea9a577a9b44299b9c15c88cf3087f3b5544', |
|
||||||
'0x0d1d4e623d10f9fba5db95830f7d3839406c6af2', |
|
||||||
'0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e', |
|
||||||
'0x2191ef87e392377ec08e7c08eb105ef5448eced5', |
|
||||||
'0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5', |
|
||||||
'0x6330a553fc93768f612722bb8c2ec78ac90b3bbc', |
|
||||||
'0x5aeda56215b167893e80b4fe645ba6d5bab767de', |
|
||||||
] |
|
||||||
|
|
||||||
export default blocklist |
|
@ -0,0 +1,28 @@ |
|||||||
|
const version = 47 |
||||||
|
import { cloneDeep } from 'lodash' |
||||||
|
|
||||||
|
/** |
||||||
|
* Stringify the `metamaskNetworkId` property of all transactions |
||||||
|
*/ |
||||||
|
export default { |
||||||
|
version, |
||||||
|
migrate: async function (originalVersionedData) { |
||||||
|
const versionedData = cloneDeep(originalVersionedData) |
||||||
|
versionedData.meta.version = version |
||||||
|
const state = versionedData.data |
||||||
|
versionedData.data = transformState(state) |
||||||
|
return versionedData |
||||||
|
}, |
||||||
|
} |
||||||
|
|
||||||
|
function transformState (state) { |
||||||
|
const transactions = state?.TransactionController?.transactions |
||||||
|
if (Array.isArray(transactions)) { |
||||||
|
transactions.forEach((transaction) => { |
||||||
|
if (typeof transaction.metamaskNetworkId === 'number') { |
||||||
|
transaction.metamaskNetworkId = transaction.metamaskNetworkId.toString() |
||||||
|
} |
||||||
|
}) |
||||||
|
} |
||||||
|
return state |
||||||
|
} |
@ -1,59 +0,0 @@ |
|||||||
<!DOCTYPE html> |
|
||||||
<html> |
|
||||||
<head> |
|
||||||
<meta charset="UTF-8"> |
|
||||||
<title>MetaMask</title> |
|
||||||
</head> |
|
||||||
<style> |
|
||||||
*{ |
|
||||||
padding: 0; |
|
||||||
margin: 0; |
|
||||||
box-sizing: border-box; |
|
||||||
} |
|
||||||
img{ |
|
||||||
display: block; |
|
||||||
} |
|
||||||
html, body{ |
|
||||||
display: flex; |
|
||||||
justify-content: center; |
|
||||||
align-items: center; |
|
||||||
width: 100%; |
|
||||||
height: 100%; |
|
||||||
} |
|
||||||
@keyframes logoAmin{ |
|
||||||
from {transform: scale(1);} |
|
||||||
50%{transform: scale(1.1);} |
|
||||||
to {transform: scale(1);} |
|
||||||
} |
|
||||||
.unsupport{ |
|
||||||
width: 80%; |
|
||||||
height: auto; |
|
||||||
overflow: hidden; |
|
||||||
padding: 10px; |
|
||||||
} |
|
||||||
.unsupport > img{ |
|
||||||
margin: 0 auto 31px auto; |
|
||||||
width: 136px; |
|
||||||
height: auto; |
|
||||||
animation: logoAmin 1s infinite linear; |
|
||||||
} |
|
||||||
.unsupport > h1{ |
|
||||||
text-align: center; |
|
||||||
font-family: Gotham; |
|
||||||
font-size: 18px; |
|
||||||
font-weight: 500; |
|
||||||
font-style: normal; |
|
||||||
font-stretch: normal; |
|
||||||
line-height: normal; |
|
||||||
letter-spacing: 1.3px; |
|
||||||
color: #33559f; |
|
||||||
} |
|
||||||
|
|
||||||
</style> |
|
||||||
<body> |
|
||||||
<div class="unsupport"> |
|
||||||
<img src="./images/cancel.png" alt=""> |
|
||||||
<h1>ENS resolver only support on Ethereum mainnet</h1> |
|
||||||
</div> |
|
||||||
</body> |
|
||||||
</html> |
|
@ -1,26 +0,0 @@ |
|||||||
module.exports = { |
|
||||||
'confirm sig requests': { |
|
||||||
signMessage: (_, cb) => { |
|
||||||
const stateUpdate = { |
|
||||||
unapprovedMsgs: {}, |
|
||||||
unapprovedMsgCount: 0, |
|
||||||
} |
|
||||||
return cb(null, stateUpdate) |
|
||||||
}, |
|
||||||
signPersonalMessage: (_, cb) => { |
|
||||||
const stateUpdate = { |
|
||||||
unapprovedPersonalMsgs: {}, |
|
||||||
unapprovedPersonalMsgCount: 0, |
|
||||||
} |
|
||||||
return cb(null, stateUpdate) |
|
||||||
}, |
|
||||||
signTypedMessage: (_, cb) => { |
|
||||||
const stateUpdate = { |
|
||||||
unapprovedTypedMessages: {}, |
|
||||||
unapprovedTypedMessagesCount: 0, |
|
||||||
} |
|
||||||
return cb(null, stateUpdate) |
|
||||||
}, |
|
||||||
}, |
|
||||||
} |
|
||||||
|
|
@ -0,0 +1,22 @@ |
|||||||
|
const http = require('http') |
||||||
|
const path = require('path') |
||||||
|
|
||||||
|
const serveHandler = require('serve-handler') |
||||||
|
|
||||||
|
const createStaticServer = (rootDirectory) => { |
||||||
|
return http.createServer((request, response) => { |
||||||
|
if (request.url.startsWith('/node_modules/')) { |
||||||
|
request.url = request.url.substr(14) |
||||||
|
return serveHandler(request, response, { |
||||||
|
directoryListing: false, |
||||||
|
public: path.resolve('./node_modules'), |
||||||
|
}) |
||||||
|
} |
||||||
|
return serveHandler(request, response, { |
||||||
|
directoryListing: false, |
||||||
|
public: rootDirectory, |
||||||
|
}) |
||||||
|
}) |
||||||
|
} |
||||||
|
|
||||||
|
module.exports = createStaticServer |
@ -1,27 +0,0 @@ |
|||||||
/* eslint-disable import/no-dynamic-require */ |
|
||||||
const fs = require('fs') |
|
||||||
const path = require('path') |
|
||||||
const promisify = require('pify') |
|
||||||
const enLocaleMessages = require('../app/_locales/en/messages.json') |
|
||||||
|
|
||||||
const writeFile = promisify(fs.writeFile) |
|
||||||
|
|
||||||
start().catch(console.error) |
|
||||||
|
|
||||||
async function start () { |
|
||||||
const statesPath = path.join(__dirname, 'states') |
|
||||||
const stateFilesNames = await promisify(fs.readdir)(statesPath) |
|
||||||
const states = {} |
|
||||||
await Promise.all(stateFilesNames.map(async (stateFileName) => { |
|
||||||
const stateFilePath = path.join(__dirname, 'states', stateFileName) |
|
||||||
const state = require(stateFilePath) |
|
||||||
|
|
||||||
state.localeMessages = { en: enLocaleMessages, current: {} } |
|
||||||
|
|
||||||
const stateName = stateFileName.split('.')[0].replace(/-/g, ' ', 'g') |
|
||||||
states[stateName] = state |
|
||||||
})) |
|
||||||
const generatedFileContent = `module.exports = ${JSON.stringify(states)}` |
|
||||||
const generatedFilePath = path.join(__dirname, 'states.js') |
|
||||||
await writeFile(generatedFilePath, generatedFileContent) |
|
||||||
} |
|
@ -1,60 +0,0 @@ |
|||||||
<!doctype html> |
|
||||||
<html> |
|
||||||
<head> |
|
||||||
<meta charset="utf-8"> |
|
||||||
<title>MetaMask</title> |
|
||||||
</head> |
|
||||||
<body> |
|
||||||
<script src="./bundle.js" type="text/javascript" charset="utf-8"></script> |
|
||||||
|
|
||||||
<style> |
|
||||||
html, body, #test-container, .super-dev-container { |
|
||||||
height: 100%; |
|
||||||
width: 100%; |
|
||||||
position: relative; |
|
||||||
background: white; |
|
||||||
} |
|
||||||
#app-content { |
|
||||||
background: #F7F7F7; |
|
||||||
} |
|
||||||
</style> |
|
||||||
|
|
||||||
<script> |
|
||||||
liveReloadCode(Date.now(), 300) |
|
||||||
function liveReloadCode(lastUpdate, updateRate) { |
|
||||||
setTimeout(iter, updateRate) |
|
||||||
|
|
||||||
function iter() { |
|
||||||
var xhr = new XMLHttpRequest() |
|
||||||
|
|
||||||
xhr.open('GET', '/-/live-reload') |
|
||||||
xhr.onreadystatechange = function() { |
|
||||||
if(xhr.readyState !== 4) { |
|
||||||
return |
|
||||||
} |
|
||||||
|
|
||||||
try { |
|
||||||
var change = JSON.parse(xhr.responseText).lastUpdate |
|
||||||
|
|
||||||
if(lastUpdate < change) { |
|
||||||
return reload() |
|
||||||
} |
|
||||||
} catch(err) { |
|
||||||
} |
|
||||||
|
|
||||||
xhr = |
|
||||||
xhr.onreadystatechange = null |
|
||||||
setTimeout(iter, updateRate) |
|
||||||
} |
|
||||||
|
|
||||||
xhr.send(null) |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
function reload() { |
|
||||||
window.location.reload() |
|
||||||
} |
|
||||||
</script> |
|
||||||
|
|
||||||
</body> |
|
||||||
</html> |
|
@ -1,156 +0,0 @@ |
|||||||
/* MOCK DEV |
|
||||||
* |
|
||||||
* This is a utility module. |
|
||||||
* It initializes a minimalist browserifiable project |
|
||||||
* that contains the Metamask UI, with a local background process. |
|
||||||
* |
|
||||||
* Includes a state reset button for restoring to initial state. |
|
||||||
* |
|
||||||
* This is a convenient way to develop and test the plugin |
|
||||||
* without having to re-open the plugin or even re-build it. |
|
||||||
*/ |
|
||||||
|
|
||||||
import log from 'loglevel' |
|
||||||
import React from 'react' |
|
||||||
import { render } from 'react-dom' |
|
||||||
import { createStore, applyMiddleware } from 'redux' |
|
||||||
import thunkMiddleware from 'redux-thunk' |
|
||||||
import * as qs from 'qs' |
|
||||||
import Selector from './selector' |
|
||||||
import * as actions from '../ui/app/store/actions' |
|
||||||
import Root from '../ui/app/pages' |
|
||||||
import rootReducer from '../ui/app/ducks' |
|
||||||
import MetamaskController from '../app/scripts/metamask-controller' |
|
||||||
import firstTimeState from '../app/scripts/first-time-state' |
|
||||||
import ExtensionPlatform from '../app/scripts/platforms/extension' |
|
||||||
|
|
||||||
const backGroundConnectionModifiers = require('./backGroundConnectionModifiers') |
|
||||||
|
|
||||||
const noop = function () {} |
|
||||||
|
|
||||||
// the states file is generated before this file is run, but after `lint` is run
|
|
||||||
const states = require('./states') /* eslint-disable-line import/no-unresolved */ |
|
||||||
|
|
||||||
window.log = log |
|
||||||
log.setLevel('debug') |
|
||||||
|
|
||||||
const routerPath = window.location.href.split('#')[1] |
|
||||||
let queryString = {} |
|
||||||
let selectedView |
|
||||||
|
|
||||||
if (routerPath) { |
|
||||||
queryString = qs.parse(routerPath.split('?')[1]) |
|
||||||
} |
|
||||||
|
|
||||||
selectedView = queryString.view || 'confirm sig requests' |
|
||||||
const firstState = states[selectedView] |
|
||||||
updateQueryParams(selectedView) |
|
||||||
|
|
||||||
function updateQueryParams (newView) { |
|
||||||
queryString.view = newView |
|
||||||
const params = qs.stringify(queryString) |
|
||||||
const locationPaths = window.location.href.split('#') |
|
||||||
const routerPath = locationPaths[1] || '' |
|
||||||
const newPath = locationPaths[0] + '#' + routerPath.split('?')[0] + `?${params}` |
|
||||||
|
|
||||||
if (window.location.href !== newPath) { |
|
||||||
window.location.href = newPath |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
//
|
|
||||||
// MetaMask Controller
|
|
||||||
//
|
|
||||||
|
|
||||||
// some extension platform APIs must be mocked
|
|
||||||
function mockPlatformApis () { |
|
||||||
global.platform.getVersion = () => '0.0.0' |
|
||||||
} |
|
||||||
|
|
||||||
const controller = new MetamaskController({ |
|
||||||
// User confirmation callbacks:
|
|
||||||
showUnconfirmedMessage: noop, |
|
||||||
showUnapprovedTx: noop, |
|
||||||
platform: {}, |
|
||||||
// initial state
|
|
||||||
initState: firstTimeState, |
|
||||||
}) |
|
||||||
global.metamaskController = controller |
|
||||||
global.platform = new ExtensionPlatform() |
|
||||||
mockPlatformApis() |
|
||||||
|
|
||||||
//
|
|
||||||
// User Interface
|
|
||||||
//
|
|
||||||
|
|
||||||
actions._setBackgroundConnection(controller.getApi()) |
|
||||||
function updateState (stateName) { |
|
||||||
selectedView = stateName |
|
||||||
updateQueryParams(stateName) |
|
||||||
const newState = states[selectedView] |
|
||||||
return { |
|
||||||
type: 'GLOBAL_FORCE_UPDATE', |
|
||||||
value: newState, |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
function modifyBackgroundConnection (backgroundConnectionModifier) { |
|
||||||
const modifiedBackgroundConnection = Object.assign({}, controller.getApi(), backgroundConnectionModifier) |
|
||||||
actions._setBackgroundConnection(modifiedBackgroundConnection) |
|
||||||
} |
|
||||||
|
|
||||||
// parse opts
|
|
||||||
const store = createStore( |
|
||||||
(state, action) => |
|
||||||
(action.type === 'GLOBAL_FORCE_UPDATE' |
|
||||||
? action.value |
|
||||||
: rootReducer(state, action)), |
|
||||||
firstState, |
|
||||||
applyMiddleware(thunkMiddleware), |
|
||||||
) |
|
||||||
|
|
||||||
// start app
|
|
||||||
startApp() |
|
||||||
|
|
||||||
function startApp () { |
|
||||||
const body = document.body |
|
||||||
const container = document.createElement('div') |
|
||||||
container.id = 'test-container' |
|
||||||
body.appendChild(container) |
|
||||||
|
|
||||||
render( |
|
||||||
<div className="super-dev-container"> |
|
||||||
<button |
|
||||||
onClick={(ev) => { |
|
||||||
ev.preventDefault() |
|
||||||
store.dispatch(updateState('terms')) |
|
||||||
}} |
|
||||||
style={{ |
|
||||||
margin: '19px 19px 0px 19px', |
|
||||||
}} |
|
||||||
> |
|
||||||
Reset State |
|
||||||
</button> |
|
||||||
<Selector |
|
||||||
states={states} |
|
||||||
selectedKey={selectedView} |
|
||||||
updateState={updateState} |
|
||||||
store={store} |
|
||||||
modifyBackgroundConnection={modifyBackgroundConnection} |
|
||||||
backGroundConnectionModifiers={backGroundConnectionModifiers} |
|
||||||
/> |
|
||||||
<div |
|
||||||
id="app-content" |
|
||||||
style={{ |
|
||||||
height: '500px', |
|
||||||
width: '360px', |
|
||||||
boxShadow: 'grey 0px 2px 9px', |
|
||||||
margin: '20px', |
|
||||||
}} |
|
||||||
> |
|
||||||
<Root store={store} /> |
|
||||||
</div> |
|
||||||
</div>, |
|
||||||
container, |
|
||||||
) |
|
||||||
} |
|
@ -1,49 +0,0 @@ |
|||||||
import PropTypes from 'prop-types' |
|
||||||
import React, { Component } from 'react' |
|
||||||
|
|
||||||
export default class Selector extends Component { |
|
||||||
state = {} |
|
||||||
|
|
||||||
render () { |
|
||||||
const { |
|
||||||
states, |
|
||||||
selectedKey, |
|
||||||
updateState, |
|
||||||
store, |
|
||||||
modifyBackgroundConnection, |
|
||||||
backGroundConnectionModifiers, |
|
||||||
} = this.props |
|
||||||
const selected = this.state.selected || selectedKey |
|
||||||
|
|
||||||
return ( |
|
||||||
<select |
|
||||||
style={{ margin: '20px 20px 0px' }} |
|
||||||
value={selected} |
|
||||||
onChange={(event) => { |
|
||||||
const selectedKey = event.target.value |
|
||||||
const backgroundConnectionModifier = backGroundConnectionModifiers[selectedKey] |
|
||||||
modifyBackgroundConnection(backgroundConnectionModifier || {}) |
|
||||||
store.dispatch(updateState(selectedKey)) |
|
||||||
this.setState({ selected: selectedKey }) |
|
||||||
}} |
|
||||||
> |
|
||||||
{Object.keys(states).map((stateName, index) => { |
|
||||||
return ( |
|
||||||
<option key={index} value={stateName}> |
|
||||||
{stateName} |
|
||||||
</option> |
|
||||||
) |
|
||||||
})} |
|
||||||
</select> |
|
||||||
) |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
Selector.propTypes = { |
|
||||||
states: PropTypes.object.isRequired, |
|
||||||
selectedKey: PropTypes.string.isRequired, |
|
||||||
updateState: PropTypes.func.isRequired, |
|
||||||
store: PropTypes.object.isRequired, |
|
||||||
modifyBackgroundConnection: PropTypes.func.isRequired, |
|
||||||
backGroundConnectionModifiers: PropTypes.object.isRequired, |
|
||||||
} |
|
@ -1,482 +0,0 @@ |
|||||||
{ |
|
||||||
"metamask": { |
|
||||||
"completedOnboarding": true, |
|
||||||
"isInitialized": true, |
|
||||||
"isUnlocked": true, |
|
||||||
"featureFlags": {"betaUI": true}, |
|
||||||
"rpcTarget": "https://rawtestrpc.metamask.io/", |
|
||||||
"identities": { |
|
||||||
"0xfdea65c8e26263f6d9a1b5de9555d2931a33b825": { |
|
||||||
"address": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825", |
|
||||||
"name": "Send Account 1" |
|
||||||
}, |
|
||||||
"0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb": { |
|
||||||
"address": "0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb", |
|
||||||
"name": "Send Account 2" |
|
||||||
}, |
|
||||||
"0x2f8d4a878cfa04a6e60d46362f5644deab66572d": { |
|
||||||
"address": "0x2f8d4a878cfa04a6e60d46362f5644deab66572d", |
|
||||||
"name": "Send Account 3" |
|
||||||
}, |
|
||||||
"0xd85a4b6a394794842887b8284293d69163007bbb": { |
|
||||||
"address": "0xd85a4b6a394794842887b8284293d69163007bbb", |
|
||||||
"name": "Send Account 4" |
|
||||||
} |
|
||||||
}, |
|
||||||
"abTests": { |
|
||||||
"fullScreenVsPopup": "control" |
|
||||||
}, |
|
||||||
"cachedBalances": {}, |
|
||||||
"unapprovedTxs": {}, |
|
||||||
"conversionRate": 19855, |
|
||||||
"conversionDate": 1489013762, |
|
||||||
"noActiveNotices": true, |
|
||||||
"frequentRpcList": [], |
|
||||||
"network": "3", |
|
||||||
"accounts": { |
|
||||||
"0xfdea65c8e26263f6d9a1b5de9555d2931a33b825": { |
|
||||||
"code": "0x", |
|
||||||
"balance": "0x47c9d71831c76efe", |
|
||||||
"nonce": "0x1b", |
|
||||||
"address": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825" |
|
||||||
}, |
|
||||||
"0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb": { |
|
||||||
"code": "0x", |
|
||||||
"balance": "0x37452b1315889f80", |
|
||||||
"nonce": "0xa", |
|
||||||
"address": "0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb" |
|
||||||
}, |
|
||||||
"0x2f8d4a878cfa04a6e60d46362f5644deab66572d": { |
|
||||||
"code": "0x", |
|
||||||
"balance": "0x30c9d71831c76efe", |
|
||||||
"nonce": "0x1c", |
|
||||||
"address": "0x2f8d4a878cfa04a6e60d46362f5644deab66572d" |
|
||||||
}, |
|
||||||
"0xd85a4b6a394794842887b8284293d69163007bbb": { |
|
||||||
"code": "0x", |
|
||||||
"balance": "0x0", |
|
||||||
"nonce": "0x0", |
|
||||||
"address": "0xd85a4b6a394794842887b8284293d69163007bbb" |
|
||||||
} |
|
||||||
}, |
|
||||||
"addressBook": [ |
|
||||||
{ |
|
||||||
"address": "0x06195827297c7a80a443b6894d3bdb8824b43896", |
|
||||||
"name": "Address Book Account 1" |
|
||||||
} |
|
||||||
], |
|
||||||
"tokens": [], |
|
||||||
"transactions": {}, |
|
||||||
"incomingTransactions": {}, |
|
||||||
"currentNetworkTxList": [], |
|
||||||
"unapprovedMsgs": {}, |
|
||||||
"unapprovedMsgCount": 0, |
|
||||||
"unapprovedPersonalMsgs": {}, |
|
||||||
"unapprovedPersonalMsgCount": 0, |
|
||||||
"keyringTypes": [ |
|
||||||
"Simple Key Pair", |
|
||||||
"HD Key Tree" |
|
||||||
], |
|
||||||
"keyrings": [ |
|
||||||
{ |
|
||||||
"type": "HD Key Tree", |
|
||||||
"accounts": [ |
|
||||||
"0xfdea65c8e26263f6d9a1b5de9555d2931a33b825", |
|
||||||
"0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb", |
|
||||||
"0x2f8d4a878cfa04a6e60d46362f5644deab66572d" |
|
||||||
] |
|
||||||
}, |
|
||||||
{ |
|
||||||
"type": "Simple Key Pair", |
|
||||||
"accounts": [ |
|
||||||
"0xfdea65c8e26263f6d9a1b5de9555d2931a33b825" |
|
||||||
] |
|
||||||
} |
|
||||||
], |
|
||||||
"selectedAddress": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825", |
|
||||||
"currentCurrency": "PHP", |
|
||||||
"provider": { |
|
||||||
"type": "testnet" |
|
||||||
}, |
|
||||||
"send": { |
|
||||||
"gasLimit": null, |
|
||||||
"gasPrice": null, |
|
||||||
"gasTotal": "0xb451dc41b578", |
|
||||||
"tokenBalance": null, |
|
||||||
"from": "", |
|
||||||
"to": "", |
|
||||||
"amount": "0x0", |
|
||||||
"memo": "", |
|
||||||
"errors": {}, |
|
||||||
"warnings": {}, |
|
||||||
"maxModeOn": false, |
|
||||||
"editingTransactionId": null |
|
||||||
}, |
|
||||||
"currentLocale": "en", |
|
||||||
"preferences": { |
|
||||||
"useNativeCurrencyAsPrimaryCurrency": true, |
|
||||||
"showFiatInTestnets": true |
|
||||||
}, |
|
||||||
"frequentRpcListDetail": [] |
|
||||||
}, |
|
||||||
"appState": { |
|
||||||
"menuOpen": false, |
|
||||||
"currentView": { |
|
||||||
"name": "accountDetail", |
|
||||||
"detailView": null, |
|
||||||
"context": "0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc" |
|
||||||
}, |
|
||||||
"accountDetail": { |
|
||||||
"subview": "transactions" |
|
||||||
}, |
|
||||||
"sidebar": {}, |
|
||||||
"modal": { |
|
||||||
"modalState": {}, |
|
||||||
"previousModalState": {} |
|
||||||
}, |
|
||||||
"isLoading": false, |
|
||||||
"warning": null, |
|
||||||
"scrollToBottom": false, |
|
||||||
"forgottenPassword": null |
|
||||||
}, |
|
||||||
"identities": {}, |
|
||||||
"confirmTransaction": { |
|
||||||
"txData": {}, |
|
||||||
"tokenData": {}, |
|
||||||
"methodData": {}, |
|
||||||
"tokenProps": { |
|
||||||
"tokenDecimals": "", |
|
||||||
"tokenSymbol": "" |
|
||||||
}, |
|
||||||
"fiatTransactionAmount": "", |
|
||||||
"fiatTransactionFee": "", |
|
||||||
"fiatTransactionTotal": "", |
|
||||||
"ethTransactionAmount": "", |
|
||||||
"ethTransactionFee": "", |
|
||||||
"ethTransactionTotal": "", |
|
||||||
"hexGasTotal": "", |
|
||||||
"nonce": "", |
|
||||||
"fetchingMethodData": false |
|
||||||
}, |
|
||||||
"gas": { |
|
||||||
"customData": { |
|
||||||
"price": null, |
|
||||||
"limit": "0x186a0" |
|
||||||
}, |
|
||||||
"basicEstimates": { |
|
||||||
"average": 73, |
|
||||||
"avgWait": 10.6, |
|
||||||
"blockTime": 13.871657754010695, |
|
||||||
"blockNum": 6655504, |
|
||||||
"fast": 160, |
|
||||||
"fastest": 290, |
|
||||||
"fastestWait": 0.5, |
|
||||||
"fastWait": 0.6, |
|
||||||
"safeLow": 50, |
|
||||||
"safeLowWait": 16.1, |
|
||||||
"speed": 0.6702462692280712 |
|
||||||
}, |
|
||||||
"basicEstimateIsLoading": false, |
|
||||||
"gasEstimatesLoading": false, |
|
||||||
"priceAndTimeEstimates": [ |
|
||||||
{ |
|
||||||
"expectedTime": "1374.1168296452973076627", |
|
||||||
"expectedWait": 99.0593088449, |
|
||||||
"gasprice": 4.1 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "1280.88976972896682763716", |
|
||||||
"expectedWait": 92.3386225672, |
|
||||||
"gasprice": 4.4 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "1245.13314632680319175597", |
|
||||||
"expectedWait": 89.7609477113, |
|
||||||
"gasprice": 4.8 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "1227.99925007911014385881", |
|
||||||
"expectedWait": 88.5257747744, |
|
||||||
"gasprice": 4.9 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "965.52572720362993349654", |
|
||||||
"expectedWait": 69.6042062402, |
|
||||||
"gasprice": 5 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "917.466895447437420776", |
|
||||||
"expectedWait": 66.1396721082, |
|
||||||
"gasprice": 5.1 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "915.81694044041496090521", |
|
||||||
"expectedWait": 66.0207277804, |
|
||||||
"gasprice": 5.2 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "902.13145619709089691874", |
|
||||||
"expectedWait": 65.034148924, |
|
||||||
"gasprice": 5.3 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "890.83591122200105749896", |
|
||||||
"expectedWait": 64.2198594443, |
|
||||||
"gasprice": 5.4 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "879.10469542971335712248", |
|
||||||
"expectedWait": 63.3741627006, |
|
||||||
"gasprice": 5.5 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "876.99737395823100420974", |
|
||||||
"expectedWait": 63.2222470818, |
|
||||||
"gasprice": 5.6 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "865.96781957003849098957", |
|
||||||
"expectedWait": 62.4271327138, |
|
||||||
"gasprice": 5.7 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "865.44839472121496158482", |
|
||||||
"expectedWait": 62.3896876688, |
|
||||||
"gasprice": 5.8 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "802.16173170976255602161", |
|
||||||
"expectedWait": 57.8273877524, |
|
||||||
"gasprice": 6 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "780.79313908053047074843", |
|
||||||
"expectedWait": 56.2869379368, |
|
||||||
"gasprice": 6.1 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "770.04888359616469549233", |
|
||||||
"expectedWait": 55.5123906062, |
|
||||||
"gasprice": 6.2 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "745.01007965146736962697", |
|
||||||
"expectedWait": 53.7073573226, |
|
||||||
"gasprice": 6.3 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "735.19921111598501681816", |
|
||||||
"expectedWait": 53.0000973318, |
|
||||||
"gasprice": 6.6 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "705.68767153912619368694", |
|
||||||
"expectedWait": 50.8726270539, |
|
||||||
"gasprice": 6.7 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "705.26438593445239690121", |
|
||||||
"expectedWait": 50.8421126329, |
|
||||||
"gasprice": 6.9 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "652.51573119854865429742", |
|
||||||
"expectedWait": 47.0394918019, |
|
||||||
"gasprice": 7 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "635.51471669299464383162", |
|
||||||
"expectedWait": 45.813898235, |
|
||||||
"gasprice": 7.1 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "634.37181911960854759036", |
|
||||||
"expectedWait": 45.7315073922, |
|
||||||
"gasprice": 7.2 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "633.23097691113902888918", |
|
||||||
"expectedWait": 45.6492647195, |
|
||||||
"gasprice": 7.3 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "112.7753456245379663928", |
|
||||||
"expectedWait": 8.1299111919, |
|
||||||
"gasprice": 7.6 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "102.9665314468898381829", |
|
||||||
"expectedWait": 7.4227992986, |
|
||||||
"gasprice": 8 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "100.94784507024919649891", |
|
||||||
"expectedWait": 7.2772733339, |
|
||||||
"gasprice": 8.1 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "100.46445647447807351078", |
|
||||||
"expectedWait": 7.2424261221, |
|
||||||
"gasprice": 8.8 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "84.91686745986737853339", |
|
||||||
"expectedWait": 6.1216091808, |
|
||||||
"gasprice": 9 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "80.39566429296684383503", |
|
||||||
"expectedWait": 5.7956781892, |
|
||||||
"gasprice": 9.1 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "78.24522052614759252715", |
|
||||||
"expectedWait": 5.6406539084, |
|
||||||
"gasprice": 9.2 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "77.1685119880459882636", |
|
||||||
"expectedWait": 5.5630345959, |
|
||||||
"gasprice": 9.5 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "72.43649507646737870178", |
|
||||||
"expectedWait": 5.2219061601, |
|
||||||
"gasprice": 9.8 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "71.48259532351443753818", |
|
||||||
"expectedWait": 5.1531400638, |
|
||||||
"gasprice": 9.9 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "58.23892805162994573827", |
|
||||||
"expectedWait": 4.1984115442, |
|
||||||
"gasprice": 10 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "53.13065124862245917617", |
|
||||||
"expectedWait": 3.8301587446, |
|
||||||
"gasprice": 10.1 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "53.03510209647058751971", |
|
||||||
"expectedWait": 3.82327066, |
|
||||||
"gasprice": 10.3 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "49.06846157804491912403", |
|
||||||
"expectedWait": 3.5373177776, |
|
||||||
"gasprice": 11 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "48.30893330101818116637", |
|
||||||
"expectedWait": 3.4825638116, |
|
||||||
"gasprice": 11.1 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "48.25099734861818116715", |
|
||||||
"expectedWait": 3.4783872414, |
|
||||||
"gasprice": 11.3 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "47.64416885027272662988", |
|
||||||
"expectedWait": 3.4346413165, |
|
||||||
"gasprice": 11.9 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "46.76354741392085498401", |
|
||||||
"expectedWait": 3.3711578128, |
|
||||||
"gasprice": 12.6 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "44.99427448545882292232", |
|
||||||
"expectedWait": 3.2436119232, |
|
||||||
"gasprice": 13 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "44.61790554199251276697", |
|
||||||
"expectedWait": 3.2164796979, |
|
||||||
"gasprice": 13.1 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "42.87832690973048070488", |
|
||||||
"expectedWait": 3.0910744534, |
|
||||||
"gasprice": 14 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "42.21224091308663044649", |
|
||||||
"expectedWait": 3.0430566888, |
|
||||||
"gasprice": 14.9 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "41.15715335111336842864", |
|
||||||
"expectedWait": 2.9669960203, |
|
||||||
"gasprice": 15 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "40.9600723880876999821", |
|
||||||
"expectedWait": 2.9527885646, |
|
||||||
"gasprice": 15.1 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "38.89138450301711177472", |
|
||||||
"expectedWait": 2.8036580193, |
|
||||||
"gasprice": 15.8 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "37.89655640860213852611", |
|
||||||
"expectedWait": 2.7319414219, |
|
||||||
"gasprice": 16 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "37.35265517364705831954", |
|
||||||
"expectedWait": 2.692731888, |
|
||||||
"gasprice": 17.4 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "36.79447683873796741798", |
|
||||||
"expectedWait": 2.652493126, |
|
||||||
"gasprice": 17.8 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "36.11439350850802090309", |
|
||||||
"expectedWait": 2.6034663015, |
|
||||||
"gasprice": 19 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "31.32676199432192471101", |
|
||||||
"expectedWait": 2.2583286403, |
|
||||||
"gasprice": 20 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "30.76792490132192471855", |
|
||||||
"expectedWait": 2.2180423888, |
|
||||||
"gasprice": 20.1 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "29.94493658520962526441", |
|
||||||
"expectedWait": 2.1587136243, |
|
||||||
"gasprice": 25 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "29.53287347625561457478", |
|
||||||
"expectedWait": 2.1290082267, |
|
||||||
"gasprice": 29 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"expectedTime": "29.09318627175614934008", |
|
||||||
"expectedWait": 2.0973114236, |
|
||||||
"gasprice": 47 |
|
||||||
} |
|
||||||
], |
|
||||||
"priceAndTimeEstimatesLastRetrieved": 1541527901281, |
|
||||||
"errors": {} |
|
||||||
}, |
|
||||||
"unconnectedAccount": { |
|
||||||
"state": "CLOSED" |
|
||||||
}, |
|
||||||
"history": { |
|
||||||
"mostRecentOverviewPage": "/" |
|
||||||
} |
|
||||||
} |
|
@ -1,32 +0,0 @@ |
|||||||
<!doctype html> |
|
||||||
<html> |
|
||||||
<head> |
|
||||||
<meta charset="utf-8"> |
|
||||||
<title>MetaMask</title> |
|
||||||
|
|
||||||
<script> |
|
||||||
window.METAMASK_DEBUG = true |
|
||||||
window.TEST_MODE = true |
|
||||||
</script> |
|
||||||
</head> |
|
||||||
<body> |
|
||||||
|
|
||||||
<!-- app content --> |
|
||||||
<div id="app-content" style="height: 100%"></div> |
|
||||||
<script src="./bundle.js" type="text/javascript" charset="utf-8"></script> |
|
||||||
|
|
||||||
</body> |
|
||||||
|
|
||||||
<style> |
|
||||||
html, body, #test-container, .super-dev-container { |
|
||||||
height: 100%; |
|
||||||
width: 100%; |
|
||||||
position: relative; |
|
||||||
background: white; |
|
||||||
} |
|
||||||
|
|
||||||
#app-content { |
|
||||||
background: #F7F7F7; |
|
||||||
} |
|
||||||
</style> |
|
||||||
</html> |
|
@ -0,0 +1,122 @@ |
|||||||
|
module.exports = { |
||||||
|
rules: { |
||||||
|
// stylelint-config-standard
|
||||||
|
|
||||||
|
'at-rule-empty-line-before': [ |
||||||
|
'always', |
||||||
|
{ |
||||||
|
except: ['blockless-after-same-name-blockless', 'first-nested'], |
||||||
|
ignore: ['after-comment'], |
||||||
|
}, |
||||||
|
], |
||||||
|
'at-rule-name-case': 'lower', |
||||||
|
'at-rule-name-space-after': 'always-single-line', |
||||||
|
'at-rule-semicolon-newline-after': 'always', |
||||||
|
'block-closing-brace-empty-line-before': 'never', |
||||||
|
'block-closing-brace-newline-after': 'always', |
||||||
|
'block-closing-brace-newline-before': 'always-multi-line', |
||||||
|
'block-closing-brace-space-before': 'always-single-line', |
||||||
|
'block-opening-brace-newline-after': 'always-multi-line', |
||||||
|
'block-opening-brace-space-after': 'always-single-line', |
||||||
|
'block-opening-brace-space-before': 'always', |
||||||
|
'color-hex-case': 'lower', |
||||||
|
'color-hex-length': 'short', |
||||||
|
'comment-empty-line-before': [ |
||||||
|
'always', |
||||||
|
{ |
||||||
|
except: ['first-nested'], |
||||||
|
ignore: ['stylelint-commands'], |
||||||
|
}, |
||||||
|
], |
||||||
|
// 'comment-whitespace-inside': 'always',
|
||||||
|
'custom-property-empty-line-before': [ |
||||||
|
'always', |
||||||
|
{ |
||||||
|
except: ['after-custom-property', 'first-nested'], |
||||||
|
ignore: ['after-comment', 'inside-single-line-block'], |
||||||
|
}, |
||||||
|
], |
||||||
|
'declaration-bang-space-after': 'never', |
||||||
|
'declaration-bang-space-before': 'always', |
||||||
|
'declaration-block-semicolon-newline-after': 'always-multi-line', |
||||||
|
'declaration-block-semicolon-space-after': 'always-single-line', |
||||||
|
'declaration-block-semicolon-space-before': 'never', |
||||||
|
'declaration-block-single-line-max-declarations': 1, |
||||||
|
'declaration-block-trailing-semicolon': 'always', |
||||||
|
'declaration-colon-newline-after': 'always-multi-line', |
||||||
|
'declaration-colon-space-after': 'always-single-line', |
||||||
|
'declaration-colon-space-before': 'never', |
||||||
|
'declaration-empty-line-before': [ |
||||||
|
'always', |
||||||
|
{ |
||||||
|
except: ['after-declaration', 'first-nested'], |
||||||
|
ignore: ['after-comment', 'inside-single-line-block'], |
||||||
|
}, |
||||||
|
], |
||||||
|
'function-comma-newline-after': 'always-multi-line', |
||||||
|
'function-comma-space-after': 'always-single-line', |
||||||
|
'function-comma-space-before': 'never', |
||||||
|
'function-max-empty-lines': 0, |
||||||
|
'function-name-case': 'lower', |
||||||
|
'function-parentheses-newline-inside': 'always-multi-line', |
||||||
|
'function-parentheses-space-inside': 'never-single-line', |
||||||
|
'function-whitespace-after': 'always', |
||||||
|
indentation: 2, |
||||||
|
'length-zero-no-unit': true, |
||||||
|
// 'max-empty-lines': 1,
|
||||||
|
'media-feature-colon-space-after': 'always', |
||||||
|
'media-feature-colon-space-before': 'never', |
||||||
|
'media-feature-name-case': 'lower', |
||||||
|
'media-feature-parentheses-space-inside': 'never', |
||||||
|
'media-feature-range-operator-space-after': 'always', |
||||||
|
'media-feature-range-operator-space-before': 'always', |
||||||
|
'media-query-list-comma-newline-after': 'always-multi-line', |
||||||
|
'media-query-list-comma-space-after': 'always-single-line', |
||||||
|
'media-query-list-comma-space-before': 'never', |
||||||
|
'no-eol-whitespace': true, |
||||||
|
'no-missing-end-of-source-newline': true, |
||||||
|
'number-leading-zero': 'always', |
||||||
|
'number-no-trailing-zeros': true, |
||||||
|
'property-case': 'lower', |
||||||
|
'rule-empty-line-before': [ |
||||||
|
'always-multi-line', |
||||||
|
{ |
||||||
|
except: ['first-nested'], |
||||||
|
ignore: ['after-comment'], |
||||||
|
}, |
||||||
|
], |
||||||
|
'selector-attribute-brackets-space-inside': 'never', |
||||||
|
'selector-attribute-operator-space-after': 'never', |
||||||
|
'selector-attribute-operator-space-before': 'never', |
||||||
|
'selector-combinator-space-after': 'always', |
||||||
|
'selector-combinator-space-before': 'always', |
||||||
|
'selector-descendant-combinator-no-non-space': true, |
||||||
|
'selector-list-comma-newline-after': 'always', |
||||||
|
'selector-list-comma-space-before': 'never', |
||||||
|
'selector-max-empty-lines': 0, |
||||||
|
'selector-pseudo-class-case': 'lower', |
||||||
|
'selector-pseudo-class-parentheses-space-inside': 'never', |
||||||
|
'selector-pseudo-element-case': 'lower', |
||||||
|
'selector-pseudo-element-colon-notation': 'double', |
||||||
|
'selector-type-case': 'lower', |
||||||
|
'unit-case': 'lower', |
||||||
|
// 'value-keyword-case': 'lower',
|
||||||
|
'value-list-comma-newline-after': 'always-multi-line', |
||||||
|
'value-list-comma-space-after': 'always-single-line', |
||||||
|
'value-list-comma-space-before': 'never', |
||||||
|
'value-list-max-empty-lines': 0, |
||||||
|
|
||||||
|
// custom rules
|
||||||
|
|
||||||
|
// 'color-named': 'never',
|
||||||
|
// 'font-family-name-quotes': 'always-where-recommended',
|
||||||
|
// 'font-weight-notation': 'numeric',
|
||||||
|
// 'function-url-quotes': 'always',
|
||||||
|
'value-no-vendor-prefix': true, |
||||||
|
'value-list-comma-newline-before': 'never-multi-line', |
||||||
|
// 'selector-attribute-quotes': 'always',
|
||||||
|
// 'selector-max-specificity': '0,5,2',
|
||||||
|
// 'max-nesting-depth': 3,
|
||||||
|
'no-unknown-animations': true, |
||||||
|
}, |
||||||
|
} |
@ -1,68 +0,0 @@ |
|||||||
// Karma configuration
|
|
||||||
// Generated on Mon Sep 11 2017 18:45:48 GMT-0700 (PDT)
|
|
||||||
|
|
||||||
module.exports = function (config) { |
|
||||||
return { |
|
||||||
// base path that will be used to resolve all patterns (eg. files, exclude)
|
|
||||||
basePath: process.cwd(), |
|
||||||
|
|
||||||
// Uncomment to allow for longer timeouts
|
|
||||||
// browserNoActivityTimeout: 100000000,
|
|
||||||
|
|
||||||
browserConsoleLogOptions: { |
|
||||||
terminal: false, |
|
||||||
}, |
|
||||||
|
|
||||||
// frameworks to use
|
|
||||||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
|
||||||
frameworks: ['qunit'], |
|
||||||
|
|
||||||
// list of files / patterns to load in the browser
|
|
||||||
files: [ |
|
||||||
'test/integration/jquery-3.1.0.min.js', |
|
||||||
{ pattern: 'dist/chrome/images/**/*.*', watched: false, included: false, served: true }, |
|
||||||
{ pattern: 'dist/chrome/fonts/**/*.*', watched: false, included: false, served: true }, |
|
||||||
{ pattern: 'dist/chrome/_locales/**/*.*', watched: false, included: false, served: true }, |
|
||||||
], |
|
||||||
|
|
||||||
proxies: { |
|
||||||
'/images/': '/base/dist/chrome/images/', |
|
||||||
'/fonts/': '/base/dist/chrome/fonts/', |
|
||||||
'/_locales/': '/base/dist/chrome/_locales/', |
|
||||||
}, |
|
||||||
|
|
||||||
// test results reporter to use
|
|
||||||
// possible values: 'dots', 'progress'
|
|
||||||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
|
||||||
reporters: ['progress'], |
|
||||||
|
|
||||||
// web server port
|
|
||||||
port: 9876, |
|
||||||
|
|
||||||
// enable / disable colors in the output (reporters and logs)
|
|
||||||
colors: true, |
|
||||||
|
|
||||||
// level of logging
|
|
||||||
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
|
||||||
logLevel: config.LOG_INFO, |
|
||||||
|
|
||||||
// enable / disable watching file and executing tests whenever any file changes
|
|
||||||
autoWatch: false, |
|
||||||
|
|
||||||
// start these browsers
|
|
||||||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
|
||||||
browsers: process.env.browsers ? |
|
||||||
JSON.parse(process.env.browsers) |
|
||||||
: ['Chrome', 'Firefox'], |
|
||||||
|
|
||||||
// Continuous Integration mode
|
|
||||||
// if true, Karma captures browsers, runs the tests and exits
|
|
||||||
singleRun: true, |
|
||||||
|
|
||||||
// Concurrency level
|
|
||||||
// how many browser should be started simultaneous
|
|
||||||
concurrency: 1, |
|
||||||
|
|
||||||
nocache: true, |
|
||||||
} |
|
||||||
} |
|