From 68ffa6d3d182f2de3c3cc28bc944aa5d6fc808e2 Mon Sep 17 00:00:00 2001 From: Rose Heart Date: Thu, 9 May 2024 14:07:42 +0000 Subject: [PATCH] Added support program to reset a Mimic wallet. Changes to be committed: new file: Extras/Mimic/WalletReset --- Extras/Mimic/WalletReset | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 Extras/Mimic/WalletReset diff --git a/Extras/Mimic/WalletReset b/Extras/Mimic/WalletReset new file mode 100755 index 0000000..8ea67bd --- /dev/null +++ b/Extras/Mimic/WalletReset @@ -0,0 +1,40 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# Jackrabbit Relay +# 2021 Copyright © Robert APM Darin +# All rights reserved unconditionally. + +import sys +sys.path.append('/home/JackrabbitRelay2/Base/Library') +import os + +import JRRsupport + +MimicData='/home/JackrabbitRelay2/Data/Mimic/' + +### +### Main code base. +### + +if len(sys.argv)<2: + print("A Mimic account is required.") + sys.exit(1) + +account=sys.argv[1] +acn=f'{MimicData}{account}.wallet' +if not os.path.exists(acn): + print('Please verify wallet name and case') + sys.exit(1) +awn=f'{MimicData}{account}.history' + +print(f"ALL INFORMATION WILL BE DELETED. Are you sure you want to RESET this wallet, {account}?") +answer=input("If you are sure, answer 'Yes' >") +if answer.lower()=='yes': + walletLock=JRRsupport.Locker(acn,ID=acn) + walletLock.Lock() + os.remove(acn) + os.remove(awn) + walletLock.Unlock() + + print(f"{account} has been fully reset")