This repository has been archived by the owner on Jun 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from skftn/0.1.1
0.1.1
- Loading branch information
Showing
25 changed files
with
588 additions
and
211 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
## Compile | ||
|
||
Requirements: | ||
|
||
- Node v8 | ||
- Latest Wownero (CLI) + `git apply light_diff.patch` | ||
|
||
#### Electron | ||
|
||
``` bash | ||
# install dependencies | ||
npm install | ||
|
||
# serve with hot reload at localhost:9080 | ||
npm run dev | ||
``` | ||
|
||
If `npm run dev` works, you can install a custom version of `wownero-wallet-cli` | ||
|
||
#### wownero-wallet-cli :star2: | ||
|
||
``` | ||
git clone https://github.com/wownero/wownero.git | ||
cd wownero | ||
git checkout <latest version here> | ||
git apply light_patch.diff | ||
make -j4 | ||
``` | ||
|
||
Use `light_patch.diff` that's included in this repository. Move resulting binary into the resources folder: | ||
|
||
``` | ||
cp build/release/bin/wownero-wallet-cli wowlight/resources/linux/bin/wowlight | ||
``` | ||
|
||
Build the light wallet: | ||
|
||
``` | ||
npm run build | ||
``` |
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,10 @@ | ||
|
||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | ||
Version 2, December 2004 | ||
|
||
Copyright (C) 2018 Wownero Inc., a Monero Enterprise Alliance partner company | ||
|
||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | ||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | ||
|
||
0. You just DO WHAT THE FUCK YOU WANT TO. |
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 |
---|---|---|
@@ -0,0 +1,75 @@ | ||
const fs = require('fs'); | ||
|
||
|
||
export class Config { | ||
constructor(wowdir) { | ||
this._path_cfg = `${wowdir}/wowlight.json`; | ||
this.create(); | ||
this.data = this.load(); | ||
} | ||
|
||
load(){ | ||
if (!fs.existsSync(this._path_cfg)) { | ||
console.log('no file yo'); | ||
return {}; | ||
} | ||
|
||
let contents = fs.readFileSync(this._path_cfg, 'utf8'); | ||
return JSON.parse(contents); | ||
} | ||
|
||
create(){ | ||
if (fs.existsSync(this._path_cfg)) { | ||
return; | ||
} | ||
|
||
let data = JSON.stringify({ | ||
"node": "node.wowne.ro:34568", | ||
"nodes": [ | ||
{"address": "node.wowne.ro:34568", "location": "New Jersey, United States", "region": "US"}, | ||
{"address": "node.pwned.systems:34568", "location": "Amsterdam, The Netherlands", "region": "EU"}, | ||
{"address": "node.wownero.com:34568", "location": "Montreal, Canada", "region": "US"}, | ||
{"address": "localhost:34568", 'location': "", "region": "*"} | ||
], | ||
"wallet_path": "" | ||
}); | ||
|
||
fs.writeFileSync(this._path_cfg, JSON.stringify(data)); | ||
console.log(`${this._path_cfg} written`); | ||
} | ||
|
||
save(){ | ||
fs.writeFileSync(this._path_cfg, JSON.stringify(this.data, null, 4)); | ||
console.log(`${this._path_cfg} written`); | ||
} | ||
|
||
selectNode(node){ | ||
if (typeof this.data === 'string' || this.data instanceof String){ | ||
this.data = JSON.parse(this.data); | ||
} | ||
|
||
node = node.trim(); | ||
if(node === ''){ | ||
return; | ||
} | ||
|
||
console.log('NEW NODE: ' + node); | ||
this.data.node = node; | ||
this.save(); | ||
|
||
return true; | ||
} | ||
|
||
saveLastWalletPath(path){ | ||
if (typeof this.data === 'string' || this.data instanceof String){ | ||
this.data = JSON.parse(this.data); | ||
} | ||
|
||
if(path === ''){ | ||
return; | ||
} | ||
|
||
this.data.wallet_path = path; | ||
this.save(); | ||
} | ||
} |
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
Oops, something went wrong.