mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-04-22 14:34:25 +02:00
check lnd for valid seed
This commit is contained in:
parent
3f939deb74
commit
7bdf519a51
@ -515,8 +515,27 @@ if [ ${mode} = "seed-import-gui" ]; then
|
||||
# check correct number of words
|
||||
wordcount=$(echo "${wordstring}" | wc -w)
|
||||
if [ ${wordcount} -eq 24 ]; then
|
||||
echo "OK - 24 words"
|
||||
wordsCorrect=1
|
||||
|
||||
# check if words are valid seed
|
||||
source <(python /home/admin/config.scripts/blitz.mnemonic.py test "${wordstring}")
|
||||
if [ "${valid}" == "0" ]; then
|
||||
whiptail --title " WARNING " --yes-button "Try Again" --no-button "Cancel" --yesno "
|
||||
The word list has 24 words BUT its not a
|
||||
valid seed word list by our test.
|
||||
|
||||
Please check for typos.
|
||||
|
||||
" 52 52
|
||||
|
||||
if [ $? -eq 1 ]; then
|
||||
clear
|
||||
echo "# CANCEL empty results in: ${RESULTFILE}"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "OK - 24 words"
|
||||
wordsCorrect=1
|
||||
fi
|
||||
else
|
||||
whiptail --title " WARNING " \
|
||||
--yes-button "Try Again" \
|
||||
|
Loading…
x
Reference in New Issue
Block a user