Exemplo n.º 1
0
        private void RestoreByWords()
        {
            string lWords = FRestoreWindow.Words;

            if (string.IsNullOrEmpty(lWords))
            {
                throw new Exception("Empty recovery phrase");
            }
            string[] lSplitedWords = lWords.Split(new char[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries);
            string   lPasscode     = WordBackupProcessor.GetSeedFromWords(lSplitedWords);

            OnWalletUncryptPasscodeRestored.Invoke(lPasscode);
        }
Exemplo n.º 2
0
 private string[] FBackupWindow_OnWordsNeeded()
 {
     try
     {
         var lRootSeed = OnRootSeedNeeded.Invoke();
         var lWords    = WordBackupProcessor.GetWordsFromSeed(lRootSeed);
         return(lWords);
     }
     catch (Exception ex)
     {
         Log.Write($"Exception thrown during generation of recovery phrase. Exception: {ex}");
         throw new BackupExceptions.BadRecoveryPhrase($"Failed to recover backup phrase. Error: {ex.Message}");
     }
 }