Skip to content

Mnemonic support#400

Merged
aguycalled merged 17 commits into
navcoin:masterfrom
aguycalled:mnemonic
Mar 28, 2019
Merged

Mnemonic support#400
aguycalled merged 17 commits into
navcoin:masterfrom
aguycalled:mnemonic

Conversation

@aguycalled

Copy link
Copy Markdown
Member

This PR adds a new RPC command to export the existing master private key encoded as a mnemonic:

dumpmnemonic

It admits an argument specifying the language.

Support for two new wallet options (-importmnemonic and -mnemoniclanguage) have also been added to allow to create a new wallet from the specified mnemonic.

Testing needed.

@matt-auckland

Copy link
Copy Markdown
Member

cACK, will test this when I have spare time

Comment thread src/mnemonic/mnemonic.cpp
}


//long_hash decode_mnemonic(const word_list& mnemonic,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there a reason we need to leave this code in?

Comment thread src/qt/navcoingui.cpp
lastDialogShown(0),
unlockWalletAction(0),
lockWalletAction(0),
toggleStakingAction(0),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is this code for?

Comment thread src/qt/navtechinit.cpp
@@ -25,7 +25,6 @@ NavTechInit::~NavTechInit()
void NavTechInit::ShowNavtechIntro(bool exitAfter)
{
NavTechInit navtechinit;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is this code for?

@proletesseract

Copy link
Copy Markdown
Member

@matt-auckland going to evaluate functionality and report back

@matt-auckland matt-auckland added this to the 4.5.2 milestone Jan 31, 2019
@marcus290

Copy link
Copy Markdown
Contributor

I manually tested dumpmnemonic in different languages and -importmnemonic and -mnemoniclanguage and it works for me.

Just wondering, why not add support for the remaining languages that are already in dictionary.cpp?

I also think 8051262 maybe should be moved out to a separate commit.

@marcus290 marcus290 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

pending Travis

@matt-auckland matt-auckland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I tested with English and Japanese.
Seems to work fine ✅
I checked if it would fail if I mixed languages ✅
I checked if it would fail if I used an incorrect spelling in the mnemonic ✅
I checked if it would work if I used the wrong number of words ✅

@aguycalled aguycalled merged commit 375c657 into navcoin:master Mar 28, 2019
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.

5 participants