Commit f0404a26 authored by Marek Kotewicz's avatar Marek Kotewicz Committed by GitHub
Browse files

Merge pull request #37 from paritytech/wordlist

Use wordlist package.
parents 5890ca87 b99067e7
......@@ -14,6 +14,7 @@
"commit": "commit-wizard"
},
"dependencies": {
"@parity/wordlist": "^1.0.1",
"bignumber.js": "^4.0.0",
"debounce": "^1.0.0",
"react": "^15.4.2",
......
This diff is collapsed.
import dictionary from '../../res/words.json'
import {randomPhrase} from '@parity/wordlist'
// TODO: make it secure!
export function words () {
let buf = Array.apply(null, { length: 11 }).map(Function.call, () => Math.random() * dictionary.length)
return buf.map(n => dictionary[Math.floor(n)]).join(' ')
return randomPhrase(11)
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment