Skip to content

Commit

Permalink
fix(autoforward): proper workaround for when having an open wallet on…
Browse files Browse the repository at this point in the history
… script start
  • Loading branch information
Keeqler committed Oct 18, 2024
1 parent 5081da6 commit 2de3944
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,12 @@ def wait_for_wallets():

print('Waiting for Monero wallet...')

while 1:
while 1:
try:
request_monero_rpc('get_balance', {'account_index': 0})
break
except Exception as e:
error = ast.literal_eval(str(e))
if not (isinstance(error, dict) and error.get('error', {}).get('message')):
raise e

request_monero_rpc('close_wallet')
except:
pass

try:
open_monero_wallet()
break
Expand Down

0 comments on commit 2de3944

Please sign in to comment.