This repository has been archived by the owner on Mar 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v0.7.2
- Loading branch information
Showing
25 changed files
with
410 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,6 @@ module.exports = class { | |
} | ||
|
||
get() { | ||
return 'test value'; | ||
return 'TESTNET'; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
// @flow | ||
import electron from 'electron'; // eslint-disable-line | ||
import { isTestnet } from '../../config/is-testnet'; | ||
|
||
export const getCoinName = () => (isTestnet() ? 'TAZ' : 'ZEC'); | ||
export const getCoinName = () => { | ||
if (electron.remote.process.env.NODE_ENV === 'test' || isTestnet()) return 'TAZ'; | ||
|
||
return 'ZEC'; | ||
}; |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// @flow | ||
import fs from 'fs'; | ||
import path from 'path'; | ||
import { promisify } from 'util'; | ||
import eres from 'eres'; | ||
|
||
import { getZcashFolder } from './get-zcash-folder'; | ||
|
||
const ZCASH_LOCK_FILE = '.lock'; | ||
|
||
export const checkLockFile = async (zcashPath?: string) => { | ||
try { | ||
const myPath = zcashPath || getZcashFolder(); | ||
const [cannotAccess] = await eres(promisify(fs.access)(path.join(myPath, ZCASH_LOCK_FILE))); | ||
return !cannotAccess; | ||
} catch (err) { | ||
return false; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// @flow | ||
import fs from 'fs'; | ||
import path from 'path'; | ||
import { getZcashFolder } from './get-zcash-folder'; | ||
|
||
const ZCASH_PID_FILE = 'zcashd.pid'; | ||
|
||
export const getDaemonProcessId = (zcashPath?: string) => { | ||
try { | ||
const myPath = zcashPath || getZcashFolder(); | ||
const buffer = fs.readFileSync(path.join(myPath, ZCASH_PID_FILE)); | ||
const pid = Number(buffer.toString().trim()); | ||
return pid; | ||
} catch (err) { | ||
return null; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// @flow | ||
import os from 'os'; | ||
import path from 'path'; | ||
import electron from 'electron'; // eslint-disable-line | ||
|
||
export const getZcashFolder = () => { | ||
const { app } = electron; | ||
|
||
if (os.platform() === 'darwin') { | ||
return path.join(app.getPath('appData'), 'Zcash'); | ||
} | ||
|
||
if (os.platform() === 'linux') { | ||
return path.join(app.getPath('home'), '.zcash'); | ||
} | ||
|
||
return path.join(app.getPath('appData'), 'Zcash'); | ||
}; |
Oops, something went wrong.