Exemple #1
0
        private void ConfirmSeed()
        {
            try
            {
                ConfirmSeedCommand.Executable = false;

                var decodedSeed = WalletSeed.DecodeAndValidateUserInput(Input, _pgpWordList);
                if (ValueArray.ShallowEquals(_seed, decodedSeed))
                {
                    _wizard.CurrentDialog = new PromptPassphrasesDialog(Wizard, _seed);
                }
                else
                {
                    MessageBox.Show("Seed does not match");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Invalid seed");
            }
            finally
            {
                ConfirmSeedCommand.Executable = true;
            }
        }
        private void ConfirmSeed()
        {
            try
            {
                ConfirmSeedCommand.Executable = false;

                // When on testnet, allow clicking through the dialog without any validation.
                if (App.Current.ActiveNetwork == BlockChainIdentity.TestNet)
                {
                    if (Input.Length == 0)
                    {
                        _wizard.CurrentDialog = new PromptPassphrasesDialog(Wizard, _seed);
                        return;
                    }
                }

                var decodedSeed = WalletSeed.DecodeAndValidateUserInput(Input, _pgpWordList);
                if (ValueArray.ShallowEquals(_seed, decodedSeed))
                {
                    _wizard.CurrentDialog = new PromptPassphrasesDialog(Wizard, _seed);
                }
                else
                {
                    MessageBox.Show("Seed does not match");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Invalid seed");
            }
            finally
            {
                ConfirmSeedCommand.Executable = true;
            }
        }