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

Parse and construct function together #328

Merged
merged 8 commits into from
Aug 26, 2019
Merged

Parse and construct function together #328

merged 8 commits into from
Aug 26, 2019

Conversation

Tbaut
Copy link
Contributor

@Tbaut Tbaut commented Aug 23, 2019

Address the concerns raised in our discussions to have a parsing and constructing function together.

src/util/suri.js Outdated Show resolved Hide resolved
Copy link
Contributor

@maciejhirsz maciejhirsz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some missing spaces

@Tbaut
Copy link
Contributor Author

Tbaut commented Aug 26, 2019

Sorry @maciejhirsz for the extra work, I needed to refactor a bit to be able to keep relevant tests.
Please review my last 2 commits (the one before the last being the most critical.)

Copy link
Contributor

@pmespresso pmespresso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works well for me!

accounts.updateNew({ address, derivationPath, derivationPassword, seed: suri, seedPhrase, validBip39Seed: true })
})
.catch(() => {
//invalid phrase
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one error catch may be redundant?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so since the catch is specific to substrateAddress whereas the other is for constructSURI

@hanwencheng
Copy link
Contributor

Tested on iOS, LGTM, only one minor comment.

Tbaut and others added 2 commits August 26, 2019 18:13
Co-Authored-By: YJ <yjkimjunior@gmail.com>
Co-Authored-By: YJ <yjkimjunior@gmail.com>
@Tbaut Tbaut merged commit 264a30a into master Aug 26, 2019
@Tbaut Tbaut deleted the tbaut-suri branch August 26, 2019 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants