Skip to content

Commit

Permalink
gui: make API fields functional
Browse files Browse the repository at this point in the history
  • Loading branch information
YoRyan committed Oct 13, 2019
1 parent bffcd26 commit 83cab35
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nuxhash/gui/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ def OnSave(self, event):
new_settings['nicehash']['wallet'] = self._Wallet.GetValue()
new_settings['nicehash']['workername'] = self._Worker.GetValue()
new_settings['nicehash']['region'] = REGIONS[self._Region.GetSelection()]
new_settings['nicehash']['api_organization'] = \
self._Organization.GetValue()
new_settings['nicehash']['api_key'] = self._ApiKey.GetValue()
new_settings['nicehash']['api_secret'] = self._ApiSecret.GetValue()
new_settings['switching']['interval'] = self._Interval.GetValue()
new_settings['switching']['threshold'] = self._Threshold.GetValue()/100.0
new_settings['gui']['units'] = UNITS[self._Units.GetSelection()]
Expand All @@ -184,6 +188,9 @@ def _Reset(self):
self._Wallet.SetValue(self._Settings['nicehash']['wallet'])
self._Worker.SetValue(self._Settings['nicehash']['workername'])
self._Region.SetValue(self._Settings['nicehash']['region'])
self._Organization.SetValue(self._Settings['nicehash']['api_organization'])
self._ApiKey.SetValue(self._Settings['nicehash']['api_key'])
self._ApiSecret.SetValue(self._Settings['nicehash']['api_secret'])
self._Interval.SetValue(self._Settings['switching']['interval'])
self._Threshold.SetValue(self._Settings['switching']['threshold']*100)
self._Units.SetValue(self._Settings['gui']['units'])
Expand Down

0 comments on commit 83cab35

Please sign in to comment.