Skip to content

Commit

Permalink
Only allow nicepool on 0.3.1 and above DEV-563 (#198)
Browse files Browse the repository at this point in the history
* Only allow nicepool on 3.1 and above

* Updated version number to 0.3.1
  • Loading branch information
dsarfati authored Oct 1, 2019
1 parent 0781499 commit 1cf1c2a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion packages/desktop-app/dist/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ init()
* 1 - Original
* 2 - Auto launch
* 3 - Pass the mining address
* 4 - Nicepool
*/

function init() {
console.log('Injecting Salad bridge')

window.salad = {
platform: 'electron',
apiVersion: 3,
apiVersion: 4,
dispatch: dispatch,
}

Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "salad",
"version": "0.3.0",
"version": "0.3.1",
"description": "Salad Technologies Desktop Application",
"author": "Salad Technologies <[email protected]>",
"homepage": "https://www.salad.io/",
Expand Down
10 changes: 5 additions & 5 deletions packages/web-app/src/modules/machine/NativeStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ export class NativeStore {
this.stop()
break
case 4000: // Network errors
case 4001:
case 4002:
case 4003:
case 4004:
case 4001:
case 4002:
case 4003:
case 4004:
store.ui.showModal('/errors/network')
this.restartMiner()
store.analytics.track('Network Error', { ErrorCode: errorCode })
Expand Down Expand Up @@ -320,7 +320,7 @@ export class NativeStore {
this.send(start, this.machineId)
} else {
let address = ''
if (featureFlags.getBool('nice-hash-pool')) {
if (window.salad.apiVersion >= 4 && featureFlags.getBool('nice-hash-pool')) {
if (!this.minerId) {
throw new Error('MinerId not found. Check that the machine is valid first. Cannot start.')
}
Expand Down

0 comments on commit 1cf1c2a

Please sign in to comment.