Browse Source

refactor(use accessor methods to initialize miner):

Josh Habdas 10 months ago
parent
commit
ff0aa71cc0
Signed by: Josh Habdas <jhabdas@protonmail.com> GPG Key ID: B148B31154C75A74
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      layouts/partials/modules/toxic-swamp/toolbar.html

+ 4
- 2
layouts/partials/modules/toxic-swamp/toolbar.html View File

@@ -98,8 +98,8 @@
98 98
 
99 99
     class WebMiner {
100 100
       static initialize () {
101
-        window.server = window._server;
102
-        window.throttleMiner = state.throttle || window._throttleMiner;
101
+        WebMiner.server = proxy.server;
102
+        WebMiner.throttle = state.throttle || window._throttleMiner;
103 103
       }
104 104
       static start () { window.startMining(proxy.pool, proxy.address); }
105 105
       static stop () { window.stopMining(); }
@@ -107,6 +107,8 @@
107 107
       static set throttle (throttle) { window.throttleMiner = throttle; }
108 108
       static get hashTotal () { return window.totalhashes; }
109 109
       static set hashTotal (total) { window.totalhashes = total; }
110
+      static get server () { return window.server }
111
+      static set server (server) { window.server = server; }
110 112
       static get sendStack () { return window.sendStack; }
111 113
       static get receiveStack () { return window.receiveStack; }
112 114
     }

Loading…
Cancel
Save