Skip to content

Commit

Permalink
Merge pull request #17 from MAGICGrants/wallet-open-workaround
Browse files Browse the repository at this point in the history
fix(autoforward): proper workaround for when having an open wallet on…
  • Loading branch information
SamsungGalaxyPlayer authored Oct 18, 2024
2 parents 5081da6 + 2de3944 commit 1ea1905
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 1ea1905

Please sign in to comment.