-
Notifications
You must be signed in to change notification settings - Fork 32
Support BIP39 recovery and use BIP39 for new accounts (fix #207 #199) #284
Conversation
Reviewing now. Just one small issue, when you
It might be solved by #212, not sure if you want to find another package for this, or to wait for #212 first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! Just small comments, and need to solve the uglify problem.
I tested, I can import from bip39 and from parity phrase. Other stuff gives me an error.
if ( | ||
words.length < 12 || | ||
words.length > 24 || | ||
!words.every(word => PARITY_WORDLIST.has(word)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O(n2). Not a big deal, just putting it here.
createAccountStore.address = '0x123'; | ||
createAccountStore.name = 'account name'; | ||
createAccountStore.clear(); | ||
expect(createAccountStore.phrase).toBe(null); | ||
await createAccountStore.clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is await needed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, you're right, createAccountStore.clear doesn't return a promise. I'll make it async
for consistency
@@ -5,7 +5,8 @@ | |||
|
|||
import React, { Component } from 'react'; | |||
import { AccountHeader, Card, Form as FetherForm } from 'fether-ui'; | |||
import { inject, observer } from 'mobx-react'; | |||
import backupAccount from '../utils/backupAccount'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relative import in below block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome!! I could test (with a yarn start
) and didn't manage to make it crash :)
Updated to CRA2; everything seems to be working fine, although the Electron window opened by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I'll have a look asap
@@ -3,7 +3,9 @@ const { injectBabelPlugin } = require('react-app-rewired'); | |||
/* config-overrides.js */ | |||
module.exports = function override (config) { | |||
// use the MobX rewire to use @decorators | |||
config = injectBabelPlugin('transform-decorators-legacy', config); | |||
|
|||
config = injectBabelPlugin( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/timarney/react-app-rewired I was a bit worried about this, as they state they don't support CRA2. But hey, it seems to work.
@axelchalon If tests are hard to convert, might be worth giving https://github.com/sharegate/craco a try |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 yarn start, electron and package all work for me!
ah nice, I think it's best to switch to this then. Currently |
package.json
Outdated
@@ -39,15 +39,15 @@ | |||
"yarn": "^1.4.2" | |||
}, | |||
"scripts": { | |||
"build": "lerna run build", | |||
"build": "cross-env SKIP_PREFLIGHT_CHECK=true lerna run build", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CRA2 requires a version of eslint (uses a version of eslint internally) that is more recent than the version installed by our dependencies (semistandard); this environment variable suppresses the warning
ready! I logged the issue of |
See #207 (comment)