@ -0,0 +1,54 @@ |
||||
# Welcome to MetaMask! |
||||
|
||||
If you're submitting code to MetaMask, there are some simple things we'd appreciate you doing to help us stay organized! |
||||
|
||||
## Submitting pull requests |
||||
|
||||
Before taking the time to code and implement something, feel free to open an issue and discuss it! There may even be an issue already open, and together we may come up with a specific strategy before you take your precious time to write code. |
||||
|
||||
### Tests |
||||
|
||||
For any new programmatic functionality, we like unit tests when possible, so if you can keep your code cleanly isolated, please do add a test file to the `tests` folder. |
||||
|
||||
### PR Format |
||||
|
||||
We use [waffle](https://waffle.io/) for project management, and it will automatically keep us organized if you do one simple thing: |
||||
|
||||
If this PR closes the issue, add the line `Fixes #$ISSUE_NUMBER`. Ex. For closing issue 418, include the line `Fixes #418`. |
||||
|
||||
If it doesn't close the issue but addresses it partially, just include a reference to the issue number, like `#418`. |
||||
|
||||
## Before Merging |
||||
|
||||
Make sure you get a `:thumbsup`, `:+1`, or `LGTM` from another collaborator before merging. |
||||
|
||||
## Before Closing Issues |
||||
|
||||
Make sure the relevant code has been reviewed and merged. |
||||
|
||||
### Developing inside a node_modules folder |
||||
|
||||
First make sure you are comfortable with [how require works](https://github.com/maxogden/art-of-node#how-require-works) in node. |
||||
|
||||
We recommend creating a folder somewhere manually called `node_modules`. For example in `~/code/node_modules`. Clone all of your git copies of modules that you want to work on into here, so for example: |
||||
|
||||
- `~/code/node_modules/dat` |
||||
- `~/code/node_modules/hyperdrive` |
||||
|
||||
When you run `npm install` inside of `~/code/node_modules/dat`, dat will get its own copy of `hyperdrive` (one if its dependencies) inside `~/code/node_modules/dat/node_modules`. However, if you encounter a bug in hyperdrive that you need to fix, but you want to test your fix in dat, you want dat to use your git copy of hyperdrive at `~/code/node_modules/hyperdrive` and not the npm copy of hyperdrive at `~/code/node_modules/dat/node_modules/hyperdrive`. |
||||
|
||||
How do you get dat to use the git copy of hyperdrive? Just delete the npm copy! |
||||
|
||||
``` |
||||
rm -rf ~/code/node_modules/dat/node_modules/hyperdrive |
||||
``` |
||||
|
||||
Now when you run dat, and it tries to `require('hyperdrive')` it first looks in its own `node_modules` folder at `~/code/node_modules/dat/node_modules` but doesnt find hyperdrive. So it goes up to `~/code/node_modules` and finds `hyperdrive` there and uses that one, your git copy. |
||||
|
||||
If you want to switch back to an npm copy, just run `npm install` inside `~/code/node_modules/dat/` and npm will download any missing modules into `~/code/node_modules/dat/node_modules` but wont touch anything in `~/code/node_modules`. |
||||
|
||||
This might seem a bit complicated at first, but is simple once you get the hang of it. Here are some rules to help you get started: |
||||
|
||||
- Never make any meaningful edits to code inside an "npm-managed" node_modules folder (such as `~/code/node_modules/dat/node_modules`), because when you run `npm install` inside those folders it could inadvertently delete all of your edits when installing an updated copy of a module. This has happened to me many times, so I just always use my git copy and delete the npm copy (as described above) to make edits to a module. |
||||
- You should never need to run any npm commands in terminal when at your "manually managed"" node_modules folder at `~/code/node_modules`. Never running npm commands at that folder also prevents npm from accidentally erasing your git copies of modules |
||||
- The location of your "manually managed" node_modules folder should be somewhere isolated from your normal require path. E.g. if you put it at `~/node_modules`, then when you run `npm install dat` at `~/Desktop` npm might decide to erase your git copy of dat at `~/node_modules/dat` and replace it with a copy from npm, which could make you lose work. Putting your manually managed `node_modules` folder in a sub-folder like `~/code` gets it "out of the way" and prevents accidents like that from happening. |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 778 B After Width: | Height: | Size: 564 B |
Before Width: | Height: | Size: 751 B After Width: | Height: | Size: 662 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.4 KiB |
@ -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: { |
||||
whiteSpace: 'pre-line', |
||||
background: 'rgb(235, 235, 235)', |
||||
height: '336px', |
||||
padding: '6px', |
||||
width: '80%', |
||||
overflowY: 'scroll', |
||||
} |
||||
}, disclaimer), |
||||
|
||||
h('button', { |
||||
style: { marginTop: '18px' }, |
||||
onClick: () => this.props.dispatch(actions.agreeToDisclaimer()) |
||||
}, 'I Agree') |
||||
]) |
||||
) |
||||
} |
||||
|
@ -0,0 +1,11 @@ |
||||
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. |
After Width: | Height: | Size: 244 KiB |
After Width: | Height: | Size: 215 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 247 KiB |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 256 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 202 KiB |
After Width: | Height: | Size: 506 KiB |
After Width: | Height: | Size: 280 KiB |
After Width: | Height: | Size: 290 KiB |
After Width: | Height: | Size: 638 KiB |
After Width: | Height: | Size: 393 KiB |