mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-21 14:11:06 +02:00
check lnd for valid seed
This commit is contained in:
@@ -515,8 +515,27 @@ if [ ${mode} = "seed-import-gui" ]; then
|
|||||||
# check correct number of words
|
# check correct number of words
|
||||||
wordcount=$(echo "${wordstring}" | wc -w)
|
wordcount=$(echo "${wordstring}" | wc -w)
|
||||||
if [ ${wordcount} -eq 24 ]; then
|
if [ ${wordcount} -eq 24 ]; then
|
||||||
|
|
||||||
|
# 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"
|
echo "OK - 24 words"
|
||||||
wordsCorrect=1
|
wordsCorrect=1
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
whiptail --title " WARNING " \
|
whiptail --title " WARNING " \
|
||||||
--yes-button "Try Again" \
|
--yes-button "Try Again" \
|
||||||
|
Reference in New Issue
Block a user