Skip to content

Commit

Permalink
Appending 25th word to mnemonic instead of separate param (eth-educat…
Browse files Browse the repository at this point in the history
…ors#1429)

Co-authored-by: valefar-on-discord <[email protected]>
  • Loading branch information
valefar-on-discord and valefar-on-discord authored Jun 19, 2023
1 parent 0405044 commit 63b651d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .eth/ethdo/create-withdrawal-change.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ done
echo "You may have used a 25th word for the mnemonic. This is not the passphrase for the"
echo "validator signing keys. When in doubt, say no to the next question."
echo
__passphraseCommand=""
read -rp "Did you use a passphrase / 25th word when you created this mnemonic? (no/yes) " __usepassphrase
case "${__usepassphrase}" in
[Yy]* )
Expand All @@ -75,7 +74,7 @@ case "${__usepassphrase}" in
fi
read -rp "Please verify your mnemonic passphrase : " __passphrase2
if [[ "${__passphrase}" = "${__passphrase2}" ]]; then
__passphraseCommand="--passphrase=${__passphrase}"
__mnemonic="${__mnemonic} ${__passphrase}"
break
else
echo "Passphrase did not match. You can try again or hit Ctrl-C to abort."
Expand All @@ -93,11 +92,11 @@ case "${__advancedCommand}" in
read -rp "Please provide the index position (0 is the most common) : " __starting_index

# Output is: Private Key: 0x...
__private_key=$($__ethdo account derive --mnemonic="${__mnemonic}" "${__passphraseCommand}" --show-private-key --path="m/12381/3600/${__starting_index}/0" | awk '{print $NF}')
__private_key=$($__ethdo account derive --mnemonic="${__mnemonic}" --show-private-key --path="m/12381/3600/${__starting_index}/0" | awk '{print $NF}')

$__ethdo validator credentials set --offline --withdrawal-address="${__address}" --private-key="${__private_key}"
;;
* ) $__ethdo validator credentials set --offline --withdrawal-address="${__address}" --mnemonic="${__mnemonic}" "${__passphraseCommand}"
* ) $__ethdo validator credentials set --offline --withdrawal-address="${__address}" --mnemonic="${__mnemonic}"
esac

result=$?
Expand Down

0 comments on commit 63b651d

Please sign in to comment.