From 0f564aa64dbeb70744de6249d88da3ed7ae2e487 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 16 Jun 2016 15:04:50 -0700 Subject: [PATCH 01/16] Add confirmation persisting to localStorage --- app/scripts/lib/config-manager.js | 11 +++++++++++ test/unit/config-manager-test.js | 32 ++++++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js index f5e1cf38d..24571748f 100644 --- a/app/scripts/lib/config-manager.js +++ b/app/scripts/lib/config-manager.js @@ -270,6 +270,17 @@ ConfigManager.prototype._emitUpdates = function(state){ }) } +ConfigManager.prototype.setConfirmed = function(confirmed) { + var data = this.getData() + data.isConfirmed = confirmed + this.setData(data) +} + +ConfigManager.prototype.getConfirmed = function() { + var data = this.getData() + return ('isConfirmed' in data) && data.isConfirmed +} + function loadData() { diff --git a/test/unit/config-manager-test.js b/test/unit/config-manager-test.js index aa94dc385..130bde2ff 100644 --- a/test/unit/config-manager-test.js +++ b/test/unit/config-manager-test.js @@ -4,11 +4,41 @@ var configManager describe('config-manager', function() { - before(function() { + beforeEach(function() { window.localStorage = {} // Hacking localStorage support into JSDom configManager = new ConfigManager() }) + describe('confirmation', function() { + + describe('#getConfirmed', function() { + it('should return false if no previous key exists', function() { + var result = configManager.getConfirmed() + assert.ok(!result) + }) + }) + + describe('#setConfirmed', function() { + it('should make getConfirmed return true once set', function() { + configManager.setConfirmed(true) + var result = configManager.getConfirmed() + assert.equal(result, true) + }) + + it('should be able to set false', function() { + configManager.setConfirmed(false) + var result = configManager.getConfirmed() + assert.equal(result, false) + }) + + it('should persist to local storage', function() { + configManager.setConfirmed(true) + var data = configManager.getData() + assert.equal(data.isConfirmed, true) + }) + }) + }) + describe('#setConfig', function() { window.localStorage = {} // Hacking localStorage support into JSDom From f6d1da7793cc04e938bf8fd7da35c8a51ffecdc3 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 16 Jun 2016 15:51:39 -0700 Subject: [PATCH 02/16] Improve template --- ui/app/template.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/app/template.js b/ui/app/template.js index 3c2d902b5..410c82a72 100644 --- a/ui/app/template.js +++ b/ui/app/template.js @@ -16,8 +16,7 @@ function COMPONENTNAME() { } COMPONENTNAME.prototype.render = function() { - var state = this.props - var rpc = state.rpc + const props = this.props return ( h('div', { From 825bb4494b7c69d174eb4add1821cd8bed178b81 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 16 Jun 2016 15:51:57 -0700 Subject: [PATCH 03/16] Add placeholder disclaimer file --- ui/app/first-time/disclaimer.txt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 ui/app/first-time/disclaimer.txt diff --git a/ui/app/first-time/disclaimer.txt b/ui/app/first-time/disclaimer.txt new file mode 100644 index 000000000..595f24825 --- /dev/null +++ b/ui/app/first-time/disclaimer.txt @@ -0,0 +1,9 @@ +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. \ No newline at end of file From 5d90167bcc8af12c8cbd9dd64174352f758c8409 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 16 Jun 2016 15:58:11 -0700 Subject: [PATCH 04/16] Expose disclaimer consent to dnode API --- app/scripts/background.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/scripts/background.js b/app/scripts/background.js index f64209ecc..1098efe87 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -188,6 +188,7 @@ function setupControllerConnection(stream){ setRpcTarget: setRpcTarget, setProviderType: setProviderType, useEtherscanProvider: useEtherscanProvider, + agreeToDisclaimer: agreeToDisclaimer, // forward directly to idStore createNewVault: idStore.createNewVault.bind(idStore), recoverFromSeed: idStore.recoverFromSeed.bind(idStore), @@ -295,6 +296,15 @@ function addUnconfirmedMsg(msgParams, cb){ // config // +function agreeToDisclaimer(cb) { + try { + configManager.setConfirmed(true) + cb() + } catch (e) { + cb(e) + } +} + // called from popup function setRpcTarget(rpcTarget){ configManager.setRpcTarget(rpcTarget) From af48b94f6fa5024e6ec07dc654e6c23d1ebd5b69 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 16 Jun 2016 15:58:45 -0700 Subject: [PATCH 05/16] Add disclaimer consent action --- ui/app/actions.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ui/app/actions.js b/ui/app/actions.js index dd38c5f0a..4a1460040 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -12,6 +12,8 @@ var actions = { UPDATE_METAMASK_STATE: 'UPDATE_METAMASK_STATE', updateMetamaskState: updateMetamaskState, // intialize screen + AGREE_TO_DISCLAIMER: 'AGREE_TO_DISCLAIMER', + agreeToDisclaimer: agreeToDisclaimer, CREATE_NEW_VAULT_IN_PROGRESS: 'CREATE_NEW_VAULT_IN_PROGRESS', SHOW_CREATE_VAULT: 'SHOW_CREATE_VAULT', SHOW_RESTORE_VAULT: 'SHOW_RESTORE_VAULT', @@ -313,6 +315,17 @@ function showInitializeMenu() { } } +function agreeToDisclaimer() { + return (dispatch) => { + dispatch(this.showLoadingIndication()) + _accountManager.agreeToDisclaimer((err) { + dispatch({ + type: this.AGREE_TO_DISCLAIMER, + }) + }) + } +} + function createNewVaultInProgress() { return { type: actions.CREATE_NEW_VAULT_IN_PROGRESS, From c5d334d37270aa4bea43d925c4eef64574aaec88 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 16 Jun 2016 16:40:55 -0700 Subject: [PATCH 06/16] Fix disclaimer approving action --- ui/app/actions.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/app/actions.js b/ui/app/actions.js index 4a1460040..e178d2340 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -318,7 +318,8 @@ function showInitializeMenu() { function agreeToDisclaimer() { return (dispatch) => { dispatch(this.showLoadingIndication()) - _accountManager.agreeToDisclaimer((err) { + _accountManager.agreeToDisclaimer((err) => { + dispatch(this.hideLoadingIndication()) dispatch({ type: this.AGREE_TO_DISCLAIMER, }) From e8ef8f3d2d0f6bf0fd014faa7b62457fb88f90d1 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 16 Jun 2016 16:41:33 -0700 Subject: [PATCH 07/16] Add confirmation status to metamask state branch --- app/scripts/lib/idStore.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js index e9b9e0e06..a0bfa9d3a 100644 --- a/app/scripts/lib/idStore.js +++ b/app/scripts/lib/idStore.js @@ -92,6 +92,7 @@ IdentityStore.prototype.getState = function(){ isInitialized: !!configManager.getWallet() && !seedWords, isUnlocked: this._isUnlocked(), seedWords: seedWords, + isConfirmed: configManager.getConfirmed(), unconfTxs: configManager.unconfirmedTxs(), transactions: configManager.getTxList(), unconfMsgs: messageManager.unconfirmedMsgs(), From 08ecbcf242073ca61e535648ac3d6ff3133f49d1 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 16 Jun 2016 16:41:57 -0700 Subject: [PATCH 08/16] Create disclaimer approval reducer --- ui/app/reducers/metamask.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index a45327189..646100120 100644 --- a/ui/app/reducers/metamask.js +++ b/ui/app/reducers/metamask.js @@ -25,6 +25,11 @@ function reduceMetamask(state, action) { case actions.UPDATE_METAMASK_STATE: return extend(metamaskState, action.value) + case actions.AGREE_TO_DISCLAIMER: + return extend(metamaskState, { + isConfirmed: true, + }) + case actions.UNLOCK_METAMASK: return extend(metamaskState, { isUnlocked: true, From f5fa0d3fa5b4377780bf90a5078f2be38e288ce2 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 16 Jun 2016 16:49:10 -0700 Subject: [PATCH 09/16] Improved template to not be invisible --- ui/app/template.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/app/template.js b/ui/app/template.js index 410c82a72..f16f3c363 100644 --- a/ui/app/template.js +++ b/ui/app/template.js @@ -21,9 +21,10 @@ COMPONENTNAME.prototype.render = function() { return ( h('div', { style: { - display: 'none', + background: 'blue', } }, [ + 'Hello, world!' ]) ) } From 93fa97f86a5d0dd4e8657bea888f2f4fbd783a56 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 16 Jun 2016 16:55:22 -0700 Subject: [PATCH 10/16] Add disclaimer component --- ui/app/first-time/disclaimer.js | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 ui/app/first-time/disclaimer.js diff --git a/ui/app/first-time/disclaimer.js b/ui/app/first-time/disclaimer.js new file mode 100644 index 000000000..05984b54c --- /dev/null +++ b/ui/app/first-time/disclaimer.js @@ -0,0 +1,56 @@ +const inherits = require('util').inherits +const Component = require('react').Component +const h = require('react-hyperscript') +const connect = require('react-redux').connect +const actions = require('../actions') +const fs = require('fs') +const path = require('path') +const disclaimer = fs.readFileSync(path.join(__dirname, 'disclaimer.txt')).toString() + +module.exports = connect(mapStateToProps)(DisclaimerScreen) + +function mapStateToProps(state) { + return {} +} + +inherits(DisclaimerScreen, Component) +function DisclaimerScreen() { + Component.call(this) +} + +DisclaimerScreen.prototype.render = function() { + + return ( + h('.flex-column.flex-center.flex-grow', [ + + h('h3.flex-center.text-transform-uppercase', { + style: { + background: '#EBEBEB', + color: '#AEAEAE', + marginBottom: 24, + width: '100%', + fontSize: '20px', + padding: 6, + }, + }, [ + 'MetaMask Terms & Conditions', + ]), + + h('div', { + style: { + background: 'rgb(235, 235, 235)', + height: '235px', + + width: '80%', + overflowY: 'scroll', + } + }, disclaimer), + + h('button', { + style: { marginTop: '18px' }, + onClick: () => this.props.dispatch(actions.agreeToDisclaimer()) + }, 'I Agree') + ]) + ) +} + From 2835112dbfe48f97383f7481925b87733d571651 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 16 Jun 2016 16:55:32 -0700 Subject: [PATCH 11/16] Conditionally display disclaimer --- ui/app/app.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ui/app/app.js b/ui/app/app.js index 25d6b1685..610bb34c8 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -8,6 +8,7 @@ const extend = require('xtend') const actions = require('./actions') const ReactCSSTransitionGroup = require('react-addons-css-transition-group') // init +const DisclaimerScreen = require('./first-time/disclaimer') const InitializeMenuScreen = require('./first-time/init-menu') const CreateVaultScreen = require('./first-time/create-vault') const CreateVaultCompleteScreen = require('./first-time/create-vault-complete') @@ -39,6 +40,7 @@ function App() { Component.call(this) } function mapStateToProps(state) { return { // state from plugin + isConfirmed: state.metamask.isConfirmed, isInitialized: state.metamask.isInitialized, isUnlocked: state.metamask.isUnlocked, currentView: state.appState.currentView, @@ -240,6 +242,10 @@ App.prototype.renderDropdown = function() { App.prototype.renderPrimary = function(){ var props = this.props + if (!props.isConfirmed) { + return h(DisclaimerScreen, {key: 'disclaimerScreen'}) + } + if (props.seedWords) { return h(CreateVaultCompleteScreen, {key: 'createVaultComplete'}) } From 1f0de5588d6980b8a0f8cd2db21773f125667c33 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 16 Jun 2016 16:55:45 -0700 Subject: [PATCH 12/16] Remove dead code --- ui/app/app.js | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/ui/app/app.js b/ui/app/app.js index 610bb34c8..6088d17e4 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -320,37 +320,3 @@ App.prototype.toggleMetamaskActive = function(){ } } -function onOffToggle(state){ - var buttonSize = '50px'; - var lockWidth = '20px'; - return ( - h('.app-toggle.flex-row.flex-center.lock' + (state.isUnlocked ? '.unlocked' : '.locked'), { - width: buttonSize, - height: buttonSize, - }, [ - h('div', { - onClick: state.toggleMetamaskActive, - style: { - width: lockWidth, - height: '' + parseInt(lockWidth) * 1.5 + 'px', - position: 'relative', - } - }, [ - h('img.lock-top', { - src: 'images/lock-top.png', - style: { - width: lockWidth, - position: 'absolute', - } - }), - h('img', { - src: 'images/lock-base.png', - style: { - width: lockWidth, - position: 'absolute', - } - }), - ]) - ]) - ) -} From 9e7a9e68371d498bd6fa053ce07f55e1214a3730 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 16 Jun 2016 16:57:56 -0700 Subject: [PATCH 13/16] Increase disclaimer scroll box height --- ui/app/first-time/disclaimer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/app/first-time/disclaimer.js b/ui/app/first-time/disclaimer.js index 05984b54c..76632077d 100644 --- a/ui/app/first-time/disclaimer.js +++ b/ui/app/first-time/disclaimer.js @@ -39,7 +39,7 @@ DisclaimerScreen.prototype.render = function() { h('div', { style: { background: 'rgb(235, 235, 235)', - height: '235px', + height: '336px', width: '80%', overflowY: 'scroll', From 79999109e20416c187bca79ed7e0a86377972144 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 16 Jun 2016 17:05:38 -0700 Subject: [PATCH 14/16] Added some real text to top of disclaimer --- ui/app/first-time/disclaimer.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/app/first-time/disclaimer.txt b/ui/app/first-time/disclaimer.txt index 595f24825..a1df99627 100644 --- a/ui/app/first-time/disclaimer.txt +++ b/ui/app/first-time/disclaimer.txt @@ -1,3 +1,5 @@ +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. @@ -6,4 +8,4 @@ Sed sem odio, malesuada ut convallis nec, accumsan sit amet nulla. Morbi fringil 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. \ No newline at end of file +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. From 69f628dbe2aea296cde8bf03a40aeef9983030b2 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 16 Jun 2016 17:11:13 -0700 Subject: [PATCH 15/16] Preserve disclaimer line breaks --- ui/app/first-time/disclaimer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/app/first-time/disclaimer.js b/ui/app/first-time/disclaimer.js index 76632077d..fe138c93b 100644 --- a/ui/app/first-time/disclaimer.js +++ b/ui/app/first-time/disclaimer.js @@ -6,7 +6,6 @@ const actions = require('../actions') const fs = require('fs') const path = require('path') const disclaimer = fs.readFileSync(path.join(__dirname, 'disclaimer.txt')).toString() - module.exports = connect(mapStateToProps)(DisclaimerScreen) function mapStateToProps(state) { @@ -38,9 +37,10 @@ DisclaimerScreen.prototype.render = function() { h('div', { style: { + whiteSpace: 'pre-line', background: 'rgb(235, 235, 235)', height: '336px', - + padding: '6px', width: '80%', overflowY: 'scroll', } From 65f9f997b002cd2a8a3eb0ba9dc12d7635cd4ec3 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 16 Jun 2016 17:22:26 -0700 Subject: [PATCH 16/16] Bump changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f498f2fa..4988003d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Make network loading indicator clickable to select accessible network. - Show more characters of addresses when space permits. - Fixed bug when signing messages under 64 hex characters long. +- Add disclaimer view with placeholder text for first time users. ## 2.3.1 2016-06-09