aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <somniac@me.com>2016-07-02 02:51:17 +0800
committerGitHub <noreply@github.com>2016-07-02 02:51:17 +0800
commitc75543dac8f81bc922d08803aaf92866ef823ddf (patch)
tree095a7a6d216cef4f3d46bd2b5747489d2984ef4e
parentd4e400e5e5a7ba501f210b722f6ccf97be9e6c17 (diff)
parent287222df25caa696583afee27f5aa77dfe0d8895 (diff)
downloadtangerine-wallet-browser-c75543dac8f81bc922d08803aaf92866ef823ddf.tar
tangerine-wallet-browser-c75543dac8f81bc922d08803aaf92866ef823ddf.tar.gz
tangerine-wallet-browser-c75543dac8f81bc922d08803aaf92866ef823ddf.tar.bz2
tangerine-wallet-browser-c75543dac8f81bc922d08803aaf92866ef823ddf.tar.lz
tangerine-wallet-browser-c75543dac8f81bc922d08803aaf92866ef823ddf.tar.xz
tangerine-wallet-browser-c75543dac8f81bc922d08803aaf92866ef823ddf.tar.zst
tangerine-wallet-browser-c75543dac8f81bc922d08803aaf92866ef823ddf.zip
Merge pull request #380 from MetaMask/FrankieDisclaimer
Frankie disclaimer
-rw-r--r--USER_AGREEMENT.md55
-rw-r--r--development/beefy.js14
-rw-r--r--development/index.html35
-rw-r--r--development/mocker.js6
-rw-r--r--development/selector.js3
-rw-r--r--package.json5
-rw-r--r--ui/app/actions.js19
-rw-r--r--ui/app/app.js21
-rw-r--r--ui/app/first-time/disclaimer.js32
-rw-r--r--ui/app/first-time/disclaimer.txt11
-rw-r--r--ui/app/reducers/app.js10
-rw-r--r--ui/index.html22
12 files changed, 119 insertions, 114 deletions
diff --git a/USER_AGREEMENT.md b/USER_AGREEMENT.md
new file mode 100644
index 000000000..064767a05
--- /dev/null
+++ b/USER_AGREEMENT.md
@@ -0,0 +1,55 @@
+# Disclaimer
+
+**METAMASK is still Beta software. Don't rely on it to hold large amounts of Ether.**
+
+## SECURITY WARNINGS
+
+**You are responsible for your own computer's security. If your machine is compromised you could lose your ether, access to your accounts and contracts and maybe more.**
+
+You are responsible for your own actions.
+
+The user acknowledges the following serious risks to any use of METAMASK and ETH and expressly agrees not to hold liable MetaMask or MetaMask Team should any of these risks occur:
+
+**METMASK AT THIS POINT IN TIME IS MEANT FOR DEVELOPERS OR PEOPLE WITH A UNDERSTANDING OF THE ETHERIUM PROTOCOL. DUE TO THE NATURE OF METMASK, THE METAMASK TEAM DOES NOT ADVISE STORING LARGE AMOUNTS OF ETHER IN METAMASK VAULTS. THE METAMASK TEAM DOES NOT TAKE RESPONSIBILTY FOR LOST OR STOLEN ETHER. BY CLICIKING AGREE AND USING METAMASK THE USER UNDERSTANDS THE RISKS OF USING EXPERIMENTAL SOFTWARE AND ACKNOWLEDGES THE FACT THAT THEIR MAY BE BUGS OR SECURTIY RISKS IN METAMASK THAT MAY RESULT IN LOSS OF ETHER AND THE THE METMASK TEAM IS NOT HELD RESPONSIBLE FOR REINBERSMENT OF LOST FUNDS.**
+
+### Risk of Regulatory Actions in One or More Jurisdictions
+
+METAMASK and ETH could be impacted by one or more regulatory inquiries or regulatory action, which could impede or limit the ability of METAMASK to continue to develop, or which could impeded or limit the ability of User to use Ethereum Platform or ETH.
+
+### Risk that METAMASK, As Developed, Will Not Meet the Expectations of User
+
+The User recognizes that METAMASK is under development and may undergo significant changes. User acknowledges that any expectations regarding the form and functionality of METAMASK held by the User may not be met upon release of METAMASK, for any number of reasons including a change in the design and implementation plans and execution of the implementation of METAMASK.
+
+### Risk of Weaknesses or Exploitable Breakthroughs in the Field of Cryptography
+
+Cryptography is an art, not a science. And the state of the art can advance over time. Advances in code cracking, or technical advances such as the development of quantum computers could present risks to cryptocurrencies and METAMASK, which could result in the theft or loss of ETH. To the extent possible, METAMASK intends to update the protocol underlying METAMASK to account for any advances in cryptography and to incorporate additional security measures, but cannot it cannot predict the future of cryptography or the success of any future security updates.
+
+### Warning of the Volatility of Crypto Currencies
+
+ETHEREUM is a new enough technology that the value of its core token and network fee currency is highly volatile, due to a combination of adoption and speculation.
+
+METAMASK cannot be held responsible for increases in the cost of network resources that affect the viability of any business activities that may take place on the blockchain.
+
+### Warning of Possible Accidental Flaws in Ethereum Apps
+
+ETHEREUM applications are only as good as the code they are written with. METAMASK cannot be held responsible if you interact with a flawed contract. ETHEREUM applications are a very new kind of software, and people are still learning how to write fully bulletproof software, so you are responsible for evaluating the trustworthiness of the websites you are willing to submit Ethereum transactions to.
+
+### Warning of Possible Malicious Contracts in Ethereum Apps
+
+ETHEREUM applications can be written maliciously. METAMASK cannot be held liable if you choose to interact with a contract that does not perform as expected. A contract may keep funds sent to it, or even impersonate the person making a request of it. METAMASK developers will do everything they can to warn you of potential threats, but they cannot be considered omniscient, and so all liability of interacting with malevolent contracts must lie on the user.
+
+### Acknowledgment, Acceptance of all Risks and Disclaimer of Warranties and Liabilities
+
+THE USER EXPRESSLY KNOWS AND AGREES THAT THE USER IS USING METAMASK AND METAMASK AT THE USER’S SOLE RISK. THE USER REPRESENTS THAT THE USER HAS AN ADEQUATE UNDERSTANDING OF THE RISKS, USAGE AND INTRICACIES OF CRYPTOGRAPHIC TOKENS AND BLOCKCHAIN-BASED OPEN SOURCE SOFTWARE, ETH PLATFORM AND ETH. THE USER ACKNOWLEDGES AND AGREES THAT, TO THE FULLEST EXTENT PERMITTED BY ANY APPLICABLE LAW, THE DISCLAIMERS OF LIABILITY CONTAINED HEREIN APPLY TO ANY AND ALL DAMAGES OR INJURY WHATSOEVER CAUSED BY OR RELATED TO RISKS OF, USE OF, OR INABILITY TO USE, ETH OR METAMASK UNDER ANY CAUSE OR ACTION WHATSOEVER OF ANY KIND IN ANY JURISDICTION, INCLUDING, WITHOUT LIMITATION, ACTIONS FOR BREACH OF WARRANTY, BREACH OF CONTRACT OR TORT (INCLUDING NEGLIGENCE) AND THAT NEITHER METAMASK NOR METMASK TEAM SHALL BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES, INCLUDING FOR LOSS OF PROFITS, GOODWILL OR DATA.
+
+### Acknowledgement of User's Duty to All Laws and Regulations
+
+The USER is responsible for their own actions with the use of the METAMASK software. Like any tool, it could be conceivably be used in ways not legal in some jurisdictions.
+
+THE USER agrees to adhere to all binding laws and regulations for the conditions in which they use METAMASK.
+
+### Risk of Temporary Network Incoherence
+
+METAMASK is finally not liable for unavoidable casualty, delays in delivery of materials, embargoes, government orders, acts of civil or military authorities, lack of energy, sickness or other ill health, injurious dance parties, rancid bacon, the acts of Gods, Nymphs, Angels (fallen or otherwise) or Djinn, or any similarly unforeseen events that render misfortune.
+
+The METAMASK DEVELOPERS wish you the very best luck in creating a better life for yourself, those you love, and your greater community, the world.
diff --git a/development/beefy.js b/development/beefy.js
index 0ed40f177..9eff94320 100644
--- a/development/beefy.js
+++ b/development/beefy.js
@@ -2,28 +2,18 @@ const beefy = require('beefy')
const http = require('http')
const fs = require('fs')
const path = require('path')
-const states = require('./states')
-
-const statesPath = path.join(__dirname, 'states.js')
-const statesJson = JSON.stringify(states)
-fs.writeFileSync(statesPath, statesJson)
const port = 8124
const handler = beefy({
- entries: ['mocker.js']
+ entries: {'mocker.js': 'bundle.js'}
, cwd: __dirname
, live: true
+ , open: true
, quiet: false
, bundlerFlags: ['-t', 'brfs']
})
-console.dir(handler)
http.createServer(handler).listen(port)
console.log(`Now listening on port ${port}`)
-
-function on404(req, resp) {
- resp.writeHead(404, {})
- resp.end('sorry folks!')
-}
diff --git a/development/index.html b/development/index.html
index 02fd01b03..aca074f3e 100644
--- a/development/index.html
+++ b/development/index.html
@@ -10,28 +10,17 @@
<div id="app-content" style="height: 100%"></div>
<script src="./bundle.js" type="text/javascript" charset="utf-8"></script>
- <!-- design reference -->
- <link rel="stylesheet" type="text/css" href="../ui/app/css/debug.css">
- <div id="design-container">
- <!-- persist scroll position on refresh -->
- <script type="text/javascript">
- var scrollElement = document.getElementById('design-container')
- function getScrollPosition () {
- var scrollTop = scrollElement.scrollTop, scrollLeft = scrollElement.scrollLeft
- window.location.hash = 'scrollTop='+scrollTop+'&scrollLeft='+scrollLeft
- }
- window.onload = function () {
- setInterval(getScrollPosition, 1000)
- var hashLocation = window.location.hash.split('#')[1]
- if (!hashLocation) return
- var sections = hashLocation.split('&')
- var scrollTop = sections[0].split('=')[1]
- var scrollLeft = sections[1].split('=')[1]
- scrollElement.scrollTop = scrollTop
- scrollElement.scrollLeft = scrollLeft
- }
- </script>
- </div>
-
</body>
+
+<style>
+html, body, #app-content, .super-dev-container {
+ height: 100%;
+ width: 100%;
+ position: relative;
+ background: #cccccc;
+}
+.mock-app-root {
+ background: #F7F7F7;
+}
+</style>
</html>
diff --git a/development/mocker.js b/development/mocker.js
index 098d46c75..0656e66ea 100644
--- a/development/mocker.js
+++ b/development/mocker.js
@@ -9,13 +9,13 @@ const Selector = require('./selector')
const qs = require('qs')
let queryString = qs.parse(window.location.href.split('#')[1])
let selectedView = queryString.view || 'account detail'
+const firstState = states[selectedView]
+updateQueryParams(selectedView)
// CSS
const MetaMaskUiCss = require('../ui/css')
const injectCss = require('inject-css')
-const firstState = states[selectedView]
-updateQueryParams()
function updateQueryParams(newView) {
queryString.view = newView
@@ -54,6 +54,8 @@ render(
style: {
height: '500px',
width: '360px',
+ boxShadow: '2px 2px 5px grey',
+ margin: '20px',
},
}, [
h(Root, {
diff --git a/development/selector.js b/development/selector.js
index b58904cdf..c466905ca 100644
--- a/development/selector.js
+++ b/development/selector.js
@@ -17,6 +17,9 @@ NewComponent.prototype.render = function () {
const selected = state.selected || selectedKey
return h('select', {
+ style: {
+ margin: '20px 20px 0px',
+ },
value: selected,
onChange:(event) => {
const selectedKey = event.target.value
diff --git a/package.json b/package.json
index 2aca46948..00cc4c23a 100644
--- a/package.json
+++ b/package.json
@@ -7,7 +7,7 @@
"start": "gulp dev",
"test": "mocha --require test/helper.js --compilers js:babel-register --recursive",
"watch": "mocha watch --compilers js:babel-register --recursive",
- "ui": "cd development && node genStates.js && beefy mocker.js:bundle.js --live --open"
+ "ui": "beefy development/mocker.js:bundle.js --live --open --cwd development --index=./development/index.html"
},
"browserify": {
"transform": [
@@ -24,8 +24,6 @@
},
"dependencies": {
"async": "^1.5.2",
- "babel-preset-es2015": "^6.9.0",
- "babel-register": "^6.9.0",
"browserify-derequire": "^0.9.4",
"clone": "^1.0.2",
"copy-to-clipboard": "^2.0.0",
@@ -54,6 +52,7 @@
"react-addons-css-transition-group": "^15.0.2",
"react-dom": "^15.0.2",
"react-hyperscript": "^2.2.2",
+ "react-markdown": "^2.3.0",
"react-redux": "^4.4.5",
"react-tooltip-component": "^0.3.0",
"readable-stream": "^2.1.2",
diff --git a/ui/app/actions.js b/ui/app/actions.js
index c6b57d29d..3e0fe55c0 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -2,10 +2,6 @@ var actions = {
GO_HOME: 'GO_HOME',
goHome: goHome,
// menu state
- TOGGLE_MENU: 'TOGGLE_MENU',
- toggleMenu: toggleMenu,
- SET_MENU_STATE: 'SET_MENU_STATE',
- closeMenu: closeMenu,
getNetworkStatus: 'getNetworkStatus',
// remote state
@@ -125,21 +121,6 @@ function goHome () {
}
}
-// menu state
-
-function toggleMenu () {
- return {
- type: actions.TOGGLE_MENU,
- }
-}
-
-function closeMenu () {
- return {
- type: actions.SET_MENU_STATE,
- value: false,
- }
-}
-
// async actions
function tryUnlockMetamask (password) {
diff --git a/ui/app/app.js b/ui/app/app.js
index 938caffd9..dcc44ee65 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -61,6 +61,7 @@ App.prototype.render = function () {
style: {
// Windows was showing a vertical scroll bar:
overflow: 'hidden',
+ position: 'relative',
},
}, [
@@ -177,7 +178,7 @@ App.prototype.renderAppBar = function () {
onClick: (event) => {
event.preventDefault()
event.stopPropagation()
- this.props.dispatch(actions.toggleMenu())
+ this.setState({ isMainMenuOpen: true })
},
}),
]),
@@ -197,7 +198,7 @@ App.prototype.renderNetworkDropdown = function () {
this.setState({ isNetworkMenuOpen: !isOpen })
},
style: {
- position: 'fixed',
+ position: 'absolute',
left: 0,
zIndex: 0,
},
@@ -239,14 +240,16 @@ App.prototype.renderNetworkDropdown = function () {
}
App.prototype.renderDropdown = function () {
- const props = this.props
+ const state = this.state || {}
+ const isOpen = state.isMainMenuOpen
+
return h(MenuDroppo, {
- isOpen: props.menuOpen,
+ isOpen: isOpen,
onClickOutside: (event) => {
- this.props.dispatch(actions.closeMenu())
+ this.setState({ isMainMenuOpen: !isOpen })
},
style: {
- position: 'fixed',
+ position: 'absolute',
right: 0,
zIndex: 0,
},
@@ -262,21 +265,21 @@ App.prototype.renderDropdown = function () {
h(DropMenuItem, {
label: 'Settings',
- closeMenu: () => this.props.dispatch(actions.closeMenu()),
+ closeMenu: () => this.setState({ isMainMenuOpen: !isOpen }),
action: () => this.props.dispatch(actions.showConfigPage()),
icon: h('i.fa.fa-gear.fa-lg', { ariaHidden: true }),
}),
h(DropMenuItem, {
label: 'Lock',
- closeMenu: () => this.props.dispatch(actions.closeMenu()),
+ closeMenu: () => this.setState({ isMainMenuOpen: !isOpen }),
action: () => this.props.dispatch(actions.lockMetamask()),
icon: h('i.fa.fa-lock.fa-lg', { ariaHidden: true }),
}),
h(DropMenuItem, {
label: 'Help',
- closeMenu: () => this.props.dispatch(actions.closeMenu()),
+ closeMenu: () => this.setState({ isMainMenuOpen: !isOpen }),
action: () => this.props.dispatch(actions.showInfoPage()),
icon: h('i.fa.fa-question.fa-lg', { ariaHidden: true }),
}),
diff --git a/ui/app/first-time/disclaimer.js b/ui/app/first-time/disclaimer.js
index 7f615cfb0..c6174a220 100644
--- a/ui/app/first-time/disclaimer.js
+++ b/ui/app/first-time/disclaimer.js
@@ -3,9 +3,10 @@ const Component = require('react').Component
const h = require('react-hyperscript')
const connect = require('react-redux').connect
const actions = require('../actions')
+const ReactMarkdown = require('react-markdown')
const fs = require('fs')
const path = require('path')
-const disclaimer = fs.readFileSync(path.join(__dirname, 'disclaimer.txt')).toString()
+const disclaimer = fs.readFileSync(path.join(__dirname, '..', '..', '..', 'USER_AGREEMENT.md')).toString()
module.exports = connect(mapStateToProps)(DisclaimerScreen)
function mapStateToProps (state) {
@@ -21,29 +22,50 @@ DisclaimerScreen.prototype.render = function () {
return (
h('.flex-column.flex-center.flex-grow', [
- h('h3.flex-center.text-transform-uppercase', {
+ h('h3.flex-center.text-transform-uppercase.terms-header', {
style: {
background: '#EBEBEB',
color: '#AEAEAE',
marginBottom: 24,
width: '100%',
fontSize: '20px',
+ textAlign: 'center',
padding: 6,
},
}, [
'MetaMask Terms & Conditions',
]),
- h('div', {
+ h('style', `
+
+ .markdown {
+ font-family: Times New Roman;
+ }
+ .markdown h1, .markdown h2, .markdown h3 {
+ margin: 10px 0;
+ font-family: arial sans-serif;
+ font-weight: bold;
+ }
+
+ `),
+
+ h('div.markdown', {
style: {
- whiteSpace: 'pre-line',
+ // whiteSpace: 'pre-line',
background: 'rgb(235, 235, 235)',
height: '310px',
padding: '6px',
width: '80%',
overflowY: 'scroll',
},
- }, disclaimer),
+ }, [
+
+ h(ReactMarkdown, {
+ source: disclaimer,
+ skipHtml: true,
+ }),
+
+ ]),
h('button', {
style: { marginTop: '18px' },
diff --git a/ui/app/first-time/disclaimer.txt b/ui/app/first-time/disclaimer.txt
deleted file mode 100644
index a1df99627..000000000
--- a/ui/app/first-time/disclaimer.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-Full disclaimer coming soon. In the meanwhile, be aware this is experimental software. We are not responsible for how you use MetaMask, or any funds that you spend or lose with it. The only way to be absolutely sure you will lose no funds on the internet is to put no funds onto the internet. Enjoy!
-
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam accumsan tortor sed fringilla ultrices. Vestibulum congue fermentum nisi, venenatis dapibus urna semper id. Phasellus pretium faucibus nisi accumsan euismod. Nunc vel leo velit. Duis est felis, bibendum non dolor et, rhoncus gravida velit. Sed nec velit at nisi congue tincidunt non at felis. Praesent tincidunt, ipsum sit amet varius vulputate, purus lacus dictum tortor, vitae tempus dui turpis a lacus. Vivamus ut elit sodales, auctor nisi vitae, gravida est. Donec id massa ac ante rhoncus interdum. Aliquam gravida augue rhoncus libero ultricies scelerisque.
-
-Cras a ornare tortor. Vestibulum et scelerisque lacus. Proin dapibus consectetur blandit. Aliquam viverra, orci eget efficitur pharetra, velit tortor rhoncus ipsum, sit amet sollicitudin turpis velit vitae nunc. Sed pretium ut nisl sed mollis. Proin libero erat, molestie id est sed, pellentesque hendrerit nulla. Donec vitae efficitur nunc. Integer ornare nisi volutpat nisi sodales cursus. Nam ante odio, congue vel turpis non, viverra congue mauris. Maecenas ullamcorper ligula eget lorem ornare mollis. Interdum et malesuada fames ac ante ipsum primis in faucibus.
-
-Sed sem odio, malesuada ut convallis nec, accumsan sit amet nulla. Morbi fringilla, purus vestibulum lacinia suscipit, massa mi pulvinar lorem, sit amet vestibulum purus turpis ut dolor. Integer felis eros, accumsan id urna ac, tincidunt vehicula purus. Pellentesque felis massa, convallis euismod vestibulum a, molestie non ante. Nulla sodales fermentum ultricies. In id malesuada diam, eget blandit arcu. Nullam a lacus a mauris rhoncus maximus eu ut ex. Phasellus non mauris mi. Duis at lectus sollicitudin, malesuada augue malesuada, tempor velit. Etiam vehicula leo id sapien feugiat consequat. Donec eget ex at sapien facilisis dapibus. Morbi condimentum magna nec venenatis vulputate. Nullam lobortis ante turpis, ac fermentum ipsum posuere id. Nullam pharetra velit vel dolor faucibus vehicula. Fusce quis ipsum nec felis blandit elementum a ut augue.
-
-Integer faucibus enim id odio auctor, ut sagittis diam luctus. Mauris iaculis rutrum risus, quis sagittis dolor fermentum eget. Praesent sit amet augue vitae erat efficitur placerat dictum ut magna. Suspendisse consectetur, risus quis pharetra molestie, enim dui accumsan erat, sed imperdiet orci dolor et nibh. Cras odio justo, pretium sit amet consequat luctus, imperdiet a lorem. Nam vulputate tincidunt erat, eget pellentesque dui elementum non. Sed vitae ante faucibus, pulvinar felis ornare, ornare felis.
-
-Donec nec lorem velit. Mauris sollicitudin quam turpis, quis finibus mauris semper in. Nullam efficitur faucibus lectus, vitae sagittis neque pellentesque in. Vivamus neque tellus, mollis at ultricies at, dignissim sit amet odio. Curabitur nec mi et lacus interdum hendrerit at et est. Nullam varius purus eu volutpat luctus. Vestibulum non sem eros. Nulla tempor, leo eu varius euismod, massa est mattis massa, id finibus mi erat a odio. Quisque et tincidunt justo. Curabitur eu lacus leo. Aliquam eget odio tempor, tincidunt nunc a, maximus diam. Curabitur venenatis nunc risus, in ullamcorper neque pharetra sit amet. Sed euismod dolor sed enim venenatis dapibus. Mauris congue magna nisl, et tincidunt dui vulputate vel.
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js
index f45be0433..06afd0ae1 100644
--- a/ui/app/reducers/app.js
+++ b/ui/app/reducers/app.js
@@ -43,16 +43,6 @@ function reduceApp (state, action) {
switch (action.type) {
- case actions.TOGGLE_MENU:
- return extend(appState, {
- menuOpen: !appState.menuOpen,
- })
-
- case actions.SET_MENU_STATE:
- return extend(appState, {
- menuOpen: action.value,
- })
-
// intialize
case actions.SHOW_CREATE_VAULT:
diff --git a/ui/index.html b/ui/index.html
index ba8a8baac..9dfaefbb3 100644
--- a/ui/index.html
+++ b/ui/index.html
@@ -14,25 +14,7 @@
<link rel="stylesheet" type="text/css" href="./app/css/debug.css">
<div id="design-container">
<img id="design-img" src="./design/metamask_wfs_jan_13.png">
- <!-- persist scroll position on refresh -->
- <script type="text/javascript">
- var scrollElement = document.getElementById('design-container')
- function getScrollPosition () {
- var scrollTop = scrollElement.scrollTop, scrollLeft = scrollElement.scrollLeft
- window.location.hash = 'scrollTop='+scrollTop+'&scrollLeft='+scrollLeft
- }
- window.onload = function () {
- setInterval(getScrollPosition, 1000)
- var hashLocation = window.location.hash.split('#')[1]
- if (!hashLocation) return
- var sections = hashLocation.split('&')
- var scrollTop = sections[0].split('=')[1]
- var scrollLeft = sections[1].split('=')[1]
- scrollElement.scrollTop = scrollTop
- scrollElement.scrollLeft = scrollLeft
- }
- </script>
</div>
-
+
</body>
-</html> \ No newline at end of file
+</html>