How to use the bip39/wordlists/english.json.map function in bip39

To help you get started, we’ve selected a few bip39 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Emurgo / yoroi-frontend / app / components / ui / autocomplete / autocomplete.js View on Github external
import TextField from 'material-ui/TextField';
import { FormControl, FormHelperText } from 'material-ui/Form';
import { MenuItem } from 'material-ui/Menu';
import ArrowDropDownIcon from 'material-ui-icons/ArrowDropDown';
import CancelIcon from 'material-ui-icons/Cancel';
import ArrowDropUpIcon from 'material-ui-icons/ArrowDropUp';
import ClearIcon from 'material-ui-icons/Clear';
import Chip from 'material-ui/Chip';
import Select from 'react-virtualized-select';
import style from './autocomplete.css';


//FIXME: this is temporal, just for the PoC
import WordLists from 'bip39/wordlists/english.json';

const suggestions = WordLists.map(word => ({
  value: word,
  label: word,
}));

class Option extends React.Component {
  handleClick = (event) => {
    this.props.onSelect(this.props.option, event);
  };

  render() {
    const { children, isFocused, isSelected, onFocus } = this.props;

    return (