-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
28e9b2e
commit 5cb7654
Showing
12 changed files
with
250 additions
and
98 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Versions | ||
|
||
## Version 5.3.0 | ||
## Version 5.3.1 | ||
|
||
- Add `chart-fees-earned` to show a chart of fees earned | ||
|
||
|
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,27 +1,45 @@ | ||
const {homedir} = require('os'); | ||
const {join} = require('path'); | ||
const {platform} = require('os'); | ||
|
||
const platforms = require('./platforms'); | ||
|
||
/** LND directory path | ||
{} | ||
{ | ||
os: { | ||
homedir: <Home Directory Function> () => <Home Directory Path String> | ||
platform: <Platform Function> () => <Platform Name String> | ||
} | ||
} | ||
@throws | ||
<Error> | ||
@returns | ||
{ | ||
path: <LND Directory Path String> | ||
} | ||
*/ | ||
module.exports = ({}) => { | ||
switch (platform()) { | ||
module.exports = ({os}) => { | ||
if (!os) { | ||
throw new Error('ExpectedOperatingSytemMethodsToDetermineLndDirectory'); | ||
} | ||
|
||
if (!os.homedir) { | ||
throw new Error('ExpectedHomedirFunctionToDetermineLndDirectory'); | ||
} | ||
|
||
if (!os.platform) { | ||
throw new Error('ExpectedPlatformFunctionToDetermineLndDirectory'); | ||
} | ||
|
||
switch (os.platform()) { | ||
case platforms.macOS: | ||
return {path: join(homedir(), 'Library', 'Application Support', 'Lnd')}; | ||
return {path: join(os.homedir(), 'Library', 'Application Support', 'Lnd')}; | ||
|
||
case platforms.windows: | ||
return {path: join(homedir(), 'Lnd')}; | ||
return {path: join(os.homedir(), 'Lnd')}; | ||
|
||
default: | ||
return {path: join(homedir(), '.lnd')}; | ||
return {path: join(os.homedir(), '.lnd')}; | ||
} | ||
}; |
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
Oops, something went wrong.