|
@@ -35,11 +35,13 @@ cd "$(dirname `readlink -f "$0"`)" || exit 1
|
|
|
[ -f "./minotari_console_wallet" ] || exit 1
|
|
|
|
|
|
[ "$AMOUNT" == "new" ] && {
|
|
|
- walletFile="./wallet_seed.txt"
|
|
|
- ./minotari_console_wallet --non-interactive-mode --network Mainnet --base-path "${BASE}" --seed-words-file-name "${walletFile}" --password "${PASSWD}"
|
|
|
+ seedFile=`mktemp`; trap "rm -rf ${seedFile}" EXIT
|
|
|
+ ./minotari_console_wallet --non-interactive-mode --network Mainnet --base-path "${BASE}" --seed-words-file-name "${seedFile}" --password "${PASSWD}"
|
|
|
[ $? -eq 0 ] || exit 1
|
|
|
- ./minotari_console_wallet --non-interactive-mode --network Mainnet --base-path "${BASE}" -p base_node.mining_enabled=false -p wallet.grpc_enabled=false --password "${PASSWD}" --recovery --seed-words `cat "${walletFile}"`
|
|
|
- exit "$?"
|
|
|
+ rm -rf "${BASE}"
|
|
|
+ TARGET=`cat "${seedFile}"`
|
|
|
+ ./minotari_console_wallet --non-interactive-mode --network Mainnet --base-path "${BASE}" -p base_node.mining_enabled=false -p wallet.grpc_enabled=false --password "${PASSWD}" --recovery --seed-words "${TARGET}"
|
|
|
+ [ $? -eq 0 ] && echo -e "\n\n\033[32mNew Wallet Seed\033[0m: \033[31m${TARGET}\033[0m\n\n\n" && exit 0 || exit 1
|
|
|
}
|
|
|
|
|
|
[ "$AMOUNT" == "seed" ] && {
|