Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing wallet import function on login page #52

Merged
merged 2 commits into from Aug 15, 2019
Merged

Fixing wallet import function on login page #52

merged 2 commits into from Aug 15, 2019

Conversation

@ryanml
Copy link
Member

ryanml commented Aug 15, 2019

@ryanml ryanml self-assigned this Aug 15, 2019
@@ -156,7 +156,7 @@ const createBraveReplacePathsTask = () => {
)
.pipe(
replace(
/'(.*)\/restore-vault'/gm,
/'(.*)\/keychains\/restore-vault'/gm,

This comment has been minimized.

Copy link
@ryanml

ryanml Aug 15, 2019

Author Member

This regex was too general, it would override the route constant on: https://github.com/brave/ethereum-remote-client/blob/master/ui/app/helpers/constants/routes.js#L19

@@ -1,6 +1,12 @@
import RestoreVaultPage from '../../../../../ui/app/pages/keychains/restore-vault'
const RestoreVaultPage = require('../../../../../ui/app/pages/keychains/restore-vault').default.WrappedComponent

This comment has been minimized.

Copy link
@ryanml

ryanml Aug 15, 2019

Author Member

The issue here is what was being extended before was not a react class, but the entire connected component (https://github.com/brave/ethereum-remote-client/blob/master/ui/app/pages/keychains/restore-vault.js#L190)

Since the above MM component doesn't have a separate container file to override, all we can do is extract the WrappedComponent which contains the class we want to extend, and then re-connect it.

@ryanml ryanml requested review from bbondy and cg505 Aug 15, 2019
@ryanml ryanml assigned ryanml and unassigned ryanml Aug 15, 2019
@ryanml ryanml marked this pull request as ready for review Aug 15, 2019
@cg505
cg505 approved these changes Aug 15, 2019
Copy link
Contributor

cg505 left a comment

lgtm!

@ryanml ryanml merged commit fcf01a2 into master Aug 15, 2019
1 check failed
1 check failed
Travis CI - Pull Request Build Failed
Details
@ryanml ryanml deleted the fix-restore branch Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.