cculianu / DonateSpareChange

A plugin for Electron Cash to automatically donate "change" outputs below a certain amount to charity.
3 stars 1 forks source link

Fix timer_interval float error #8

Closed zquestz closed 2 years ago

zquestz commented 2 years ago

On my Arch box I noticed the error below. Simply changing the initialization of timer_interval was all that was needed. Plugin now works as expected. Figured I should toss up a PR.

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/electroncash/plugins.py", line 593, in run_hook
    r = f(*args)
  File "/home/quest/.electron-cash/external_plugins/donate_spare_change.zip/DonateSpareChange/qt.py", line 79, in init_qt
    self.load_wallet(window.wallet, window)
  File "/home/quest/.electron-cash/external_plugins/donate_spare_change.zip/DonateSpareChange/qt.py", line 89, in load_wallet
    self.instances.append(Instance(self, wallet, window))
  File "/home/quest/.electron-cash/external_plugins/donate_spare_change.zip/DonateSpareChange/qt.py", line 163, in __init__
    self.engine = self.Engine(self, self.wallet, self.window, self.co_mgr, self.data)
  File "/home/quest/.electron-cash/external_plugins/donate_spare_change.zip/DonateSpareChange/qt.py", line 1044, in __init__
    self.timer.setInterval(self.timer_interval) # wake up every 10 seconds
TypeError: setInterval(self, int): argument 1 has unexpected type 'float'
cculianu commented 2 years ago

thanks. This is an issue with Python 3.10. But thank you.