0.1.1
Sander Ferdinand 6 years ago
parent 129e335035
commit 94e1db3a4e
No known key found for this signature in database
GPG Key ID: 7BBC83D7A8810AAB

@ -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
```

@ -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.

@ -1,69 +1,17 @@
# Wownero Light Wallet :computer: :two_hearts: :ok_hand:
# wowlight
An experimental crypto wallet for Wownero. Possibly the worst ever made. 100% WOW.
- Electron/Vue.js
- Remote node only
- Linux/Windows/OSX
- Integration with [WFS](https://funding.wownero.com)
- USD/WOW conversion
## Compile :two_men_holding_hands:
Requirements:
- Node v8 :-1:
- Wownero on tag `v0.3.1.1` :fire:
- A patch to the above git tag :sunglasses:
#### Electron :sob:
Clone this repo and install npm packages:
``` bash
# install dependencies
npm install
# serve with hot reload at localhost:9080
npm run dev
# build electron application for production
npm run build
```
![](https://light.wownero.com/wowlight.png)
If `npm run dev` works, you can install a custom version of `wownero-wallet-cli` :alien:
Wownero wallet full of questionable development practices.
#### wownero-wallet-cli :star2:
```
git clone https://github.com/wownero/wownero.git
cd wownero
git checkout tags/v0.3.1.1
git apply light_patch.diff
make -j4
```
Use `light_patch.diff` that's included in this repository. :two_women_holding_hands:
If it compiled successfully; you can move the binary into the resources folder:
```
cp build/release/bin/wownero-wallet-cli wowlight/resources/linux/bin/wowlight
```
Build the light wallet:
```
npm run build
```
Resulting build will go into `build/`
### Technical
- Electron/Vue.js
- Remote node only
- 100% WOW
This GUI is a wrapper for a custom `wownero-wallet-cli`. `stdout` is parsed with Regex. What can go wrong :scream: ?
Download: [https://light.wownero.com](https://light.wownero.com)
The code base is one big spaghetti. 100% WOW.
See `Install.md` for compilation instructions.
### License

@ -1,6 +1,6 @@
{
"name": "wowlight",
"version": "0.1.0",
"version": "0.1.1",
"author": "dsc <xmrdsc@protonmail.com>",
"description": "Wownero Light Wallet",
"license": "WTFPL",

@ -14,8 +14,12 @@
<script>
require('module').globalPaths.push('<%= htmlWebpackPlugin.options.nodeModules.replace(/\\/g, '\\\\') %>')
</script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" crossorigin="anonymous">
<% } %>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" crossorigin="anonymous">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.5/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
</head>
<body>
<div ref="app" id="app"></div>

@ -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();
}
}

@ -12,27 +12,27 @@ let mainWindow
const electron = require('electron');
const {ipcMain} = require('electron');
// import jQuery from 'jquery';
const path = require('path');
const wowrpc = require('./wowrpc');
const config = require('./config');
const Store = require('electron-store');
const store = new Store();
const fs = require('fs');
const utils = require('electron-util');
let homedir = (process.platform === 'win32') ? process.env.HOMEPATH : process.env.HOME;
let wowdir = `${homedir}/Wownero`;
let wowdir = path.join(homedir, 'Wownero');
if (!fs.existsSync(wowdir)){
console.log(`${wowdir} created`);
fs.mkdirSync(wowdir);
}
// WowRPC & cfg bootstrap
let wallet = new wowrpc.WowRpc(wowdir);
console.log(`getWalletDir(): ${wowdir}`);
let cfg = new config.Config(wowdir);
wallet._cli_daemon_address = cfg.data.node;
const winURL = process.env.NODE_ENV === 'development' ? `http://localhost:9080` : `file://${__dirname}/index.html`
import { platform, cliPath } from './binaries';
@ -55,10 +55,14 @@ function createWindow() {
}
mainWindow.loadURL(winURL);
// mainWindow.webContents.openDevTools();
mainWindow.webContents.on("devtools-opened", () => {
mainWindow.webContents.closeDevTools();
});
if(process.env.NODE_ENV === 'development'){
mainWindow.webContents.openDevTools();
} else {
mainWindow.webContents.on("devtools-opened", () => {
mainWindow.webContents.closeDevTools();
});
}
mainWindow.on('closed', () => {
mainWindow = null;
@ -99,6 +103,8 @@ function createWindow() {
const menu = Menu.buildFromTemplate(template);
Menu.setApplicationMenu(menu);
}
wallet.getEmbeddedVersion();
}
app.on('ready', createWindow)
@ -125,16 +131,28 @@ app.on('activate', () => {
}
});
ipcMain.on('ping', (event, data) => {
console.log("received ping!");
event.sender.send('pong', Math.random());
ipcMain.on('rpc_get_embedded_version', (event) => {
wallet.onEmbeddedVersion = (version) => {
event.sender.send( 'embedded_version', version);
};
wallet.getEmbeddedVersion();
});
ipcMain.on('rpc_get_wowdir', (event, data) => {
console.log('RPC_GET_WOWDIR');
event.sender.send('rpc_get_wowdir', wowdir);
});
ipcMain.on('rpc_cfg_set_node', (event, node) => {
if(cfg.selectNode(node)){
wallet._cli_daemon_address = node;
}
});
ipcMain.on('rpc_get_cfg', (event) => {
event.sender.send('rpc_get_cfg', cfg.data);
});
ipcMain.on('rpc_create_wallet', (event, data) => {
console.log('creating wallet!');
wallet.onCreateWalletFinished = function(data){
@ -178,6 +196,7 @@ function resetWallet(){
}
wallet = new wowrpc.WowRpc(wowdir);
wallet._cli_daemon_address = cfg.data.node;
}
ipcMain.on('rpc_close_wallet', (event) => {
@ -192,6 +211,7 @@ ipcMain.on('rpc_kill_wallet', (event) => {
ipcMain.on('rpc_open_wallet', (event, data) => {
wallet.onWalletOpened = function(data){
cfg.saveLastWalletPath(data.wallet_path);
event.sender.send('rpc_wallet_opened', data);
}

@ -23,10 +23,12 @@ export class WowRpc {
this._wallet_path = '';
this._cli_wallet_password = '';
this._cli_wallet_address = null;
this._cli_daemon_address = '';
this._cli_wallet_selected_account = null;
this._cli_balance_unlocked = null;
this._cli_balance = null;
this._cli_txs = [];
this._version = "";
this._buffer = "";
this._sending = false;
@ -43,10 +45,6 @@ export class WowRpc {
'--generate-new-wallet',
this._create_wallet_tmp_path
]
this._cli_args_connect = [
'--daemon-address',
'node.wowne.ro:34568'
];
// '--restore-deterministic-wallet' recover from seed
// lil' state machine
@ -364,8 +362,7 @@ export class WowRpc {
this._wallet_path = wallet_path;
this._cli_wallet_password = wallet_password;
let cli_args = [];
cli_args = cli_args.concat(this._cli_args_connect);
let cli_args = ['--daemon-address', this._cli_daemon_address];
cli_args = cli_args.concat(this._cli_args_default);
cli_args.push('--wallet-file');
cli_args.push(wallet_path);
@ -470,6 +467,24 @@ export class WowRpc {
}
}
getEmbeddedVersion(){
console.log('Retrieving embedded version.');
let args = ['--version'];
this._cli_process = childProcess.spawn(this._cli_path, args);
this._cli_process.stdout.on('data', (data) => {
data = new TextDecoder("utf-8").decode(data);
console.log("[cli] " + data);
let version = data.trim().split(" ").slice(1).join(" ").trim();
this._cli_process.kill();
this.onEmbeddedVersion(version);
});
}
onEmbeddedVersion(version){
// overloaded
}
onWalletOpened(data){
// overloaded
}

@ -31,7 +31,7 @@
<input type="password" id="password" class="form-control" placeholder="..." required="" autofocus autocomplete="off" style="z-index:666;">
</div>
<div class="col-sm-3">
<button id="x_btn" v-on:click="submitPassword" type="button" class="btn btn-success">
<button id="x_btn2" v-on:click="submitPassword" type="button" class="btn btn-success">
<!-- fa fa-refresh fa-spin -->
<i class="fa fa-folder-open" aria-hidden="true"></i>
Open
@ -71,91 +71,7 @@
'loading_img': '',
'rotateInterval': false,
'message_box_images': [],
'messages': [
"This could take a while. Or not. Who knows? It might even give you an error!",
"Two days from now, tomorrow will be yesterday.",
"You will soon have an out of money experience.",
"Two can live as cheaply as one, for half as long.",
"Hard work pay off in future. Laziness pay off now.",
"The crypto apocalypse is near, might as well have dessert.",
"This coin is no good. Try another.",
"Of all the shitcoins, you picked WOW. Congratulations!",
"WOW is going nowhere, but at least the path is interesting.",
"Indecision is key to flexibility.",
"A day without sunshine is like night.",
"The fortune you seek is in another wallet.",
"You have kleptomania. Take some WOW for it.",
"perl5 is just syntax; CPAN is the language",
"This software sucks. Why are you executing random crap from the internet?",
"Linux sucks.",
"Windows sucks.",
"OSX sucks.",
"TempleOS ftw.",
"Perl sucks.",
"garyzeasshole sucks.",
'My hobby is \'collecting magic internet money\'.',
'Hacking Roger Ver.',
'Hacking Statue of liberty.',
'Monero is better. You should use it.',
'Hacking Area 51.',
'Hacking the Illuminati.',
'Hacking everyone.',
'PRIVMSG garyzeasshole A/S/L?\\r\\n',
'Hacking all banks.',
'Be your own bank. lol.',
'Hacking fluffypony.',
'Making WOW great again.',
'Ordering Kebab.',
'Ordering Pizza.',
'SELECT * INTO OUTFILE \'/tmp/kek.dump\' FROM users; DROP TABLE clients; #cunts',
'SELECT * FROM Users WHERE UserId = 105 OR 1=1; ',
'¯\\_(ツ)_/¯',
'Shorting MoneroV.',
'Losing private keys.',
'Shorting Verge.',
'Boating accidents.',
'Forking Wownero.',
'Stealing wowbux funds.',
'Spamming bitcointalk.org.',
'Shilling wownero on reddit.',
'Spambot attacking freenode.',
'Hacking jwintern.',
'Hacking dsc.',
'Stealing WFS funds.',
'Trolling Perl community.',
'Don\'t you dare spending any WOW today.',
'No Doubt - Don\'t Speak',
'Adding N to (X)',
'Running garytheasshole\'s oneliners...',
'.seen mattcode',
'Checking gap in pond',
'Check can withdraw new purse',
'Sun is not doing, Allah is doing',
'When block?',
'When payout?',
'When fork?',
'ö-pöpoo!',
'Dividing integer by 0',
'Initiating self-destruct function',
'Yo mama so dumb, she thinks XRP is an actual cryptocurrency',
'Executing DDoS attack on MoneroV\'s network',
'Uploading private keys to FTP, please wait',
'Connecting to SETI@home network',
'GPS Location Service activated',
'Exchanging your WOW for ERC-20 WOW tokens',
'Calculating the answer to the great question of life, the universe, and everything',
'Background mining initiated... CPU intensity 200%',
'Trolling Masari community about their non-premine premine',
'Deleting System32 folder',
'Downloading BLACKED.Riley.Reid.XXX.SD.MP4',
'Forming Voltron!',
'Generating Wownero Roadmap...',
'Generating Wownero Whitepaper...',
'Sending all funds to wownero.win',
'Shaving away klubus and grumbo',
'Contacting Stealy for more plumbus',
'Rebuilding WinoBot!'
]
'messages': []
}
},
methods: {
@ -218,6 +134,9 @@
}
},
mounted () {
ipcRenderer.send('rpc_get_wowdir');
ipcRenderer.send('rpc_get_cfg');
Array.prototype.insert = function ( index, item ) {
this.splice( index, 0, item );
};
@ -228,6 +147,13 @@
}, 1000);
});
ipcRenderer.send('rpc_get_embedded_version');
// bootstrap edgy messages.js
let {messages} = require('./assets/messages.js');
this.messages = messages;
// bootstrap edgy images
for (let i = 0; i < 32; i++) {
this.message_box_images.push('l' + i + '.gif');
}
@ -236,6 +162,7 @@
let window_width = jQuery(window).width();
let window_height = jQuery(window).height();
// background mouse animations
jQuery(document).mousemove((event) => {
let offset_x = 100 - (event.pageX / window_width) * 100;
let offset_y = -40 - (event.pageY / window_height) * 100;
@ -244,6 +171,12 @@
html.css('background-position-y', '' + (offset_y / 5) + 'px');
});
this.$electron.ipcRenderer.on('embedded_version', (event, version) => {
this.$store.commit('addEmbeddedVersion', {
'version': version
});
});
this.$electron.ipcRenderer.on('rpc_wallet_opened', (event) => {
this.$store.commit('showMessage', {
'title': '',
@ -277,6 +210,6 @@
<style>
@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro');
@import url('~@/assets/bootstrap.min.css');
@import url('~@/assets/wow.css');
</style>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,88 @@
'use strict';
export const messages = [
"This could take a while. Or not. Who knows? It might even give you an error!",
"Two days from now, tomorrow will be yesterday.",
"You will soon have an out of money experience.",
"Two can live as cheaply as one, for half as long.",
"Hard work pay off in future. Laziness pay off now.",
"The crypto apocalypse is near, might as well have dessert.",
"This coin is no good. Try another.",
"Of all the shitcoins, you picked WOW. Congratulations!",
"WOW is going nowhere, but at least the path is interesting.",
"Indecision is key to flexibility.",
"A day without sunshine is like night.",
"The fortune you seek is in another wallet.",
"You have kleptomania. Take some WOW for it.",
"perl5 is just syntax; CPAN is the language",
"This software sucks. Why are you executing random crap from the internet?",
"Linux sucks.",
"Windows sucks.",
"OSX sucks.",
"TempleOS ftw.",
"Perl sucks.",
"garyzeasshole sucks.",
'My hobby is \'collecting magic internet money\'.',
'Hacking Roger Ver.',
'Hacking Statue of liberty.',
'Monero is better. You should use it.',
'Hacking Area 51.',
'Hacking the Illuminati.',
'Hacking everyone.',
'PRIVMSG garyzeasshole A/S/L?\\r\\n',
'Hacking all banks.',
'Be your own bank. lol.',
'Hacking fluffypony.',
'Making WOW great again.',
'Ordering Kebab.',
'Ordering Pizza.',
'SELECT * INTO OUTFILE \'/tmp/kek.dump\' FROM users; DROP TABLE clients; #cunts',
'SELECT * FROM users WHERE id = 105 OR 1=1;',
'¯\\_(ツ)_/¯',
'Shorting MoneroV.',
'Losing private keys.',
'Shorting Verge.',
'Boating accidents.',
'Forking Wownero.',
'Stealing wowbux funds.',
'Spamming bitcointalk.org.',
'Shilling wownero on reddit.',
'Spambot attacking freenode.',
'Hacking jwintern.',
'Hacking dsc.',
'Stealing WFS funds.',
'Trolling Perl community.',
'Don\'t you dare spending any WOW today.',
'No Doubt - Don\'t Speak',
'Adding N to (X)',
'Running garytheasshole\'s oneliners...',
'.seen mattcode',
'Checking gap in pond',
'Check can withdraw new purse',
'Sun is not doing, Allah is doing',
'When block?',
'When payout?',
'When fork?',
'ö-pöpoo!',
'Dividing integer by 0',
'Initiating self-destruct function',
'Yo mama so dumb, she thinks XRP is an actual cryptocurrency',
'Executing DDoS attack on MoneroV\'s network',
'Uploading private keys to FTP, please wait',
'Connecting to SETI@home network',
'GPS Location Service activated',
'Exchanging your WOW for ERC-20 WOW tokens',
'Calculating the answer to the great question of life, the universe, and everything',
'Background mining initiated... CPU intensity 200%',
'Trolling Masari community about their non-premine premine',
'Deleting System32 folder',
'Downloading BLACKED.Riley.Reid.XXX.SD.MP4',
'Forming Voltron!',
'Generating Wownero Roadmap...',
'Generating Wownero Whitepaper...',
'Sending all funds to wownero.win',
'Shaving away klubus and grumbo',
'Contacting Stealy for more plumbus',
'Rebuilding WinoBot!'
]

@ -1172,3 +1172,32 @@ main.enterpassword .password_seq .heli {
left: 420px;
bottom: 4px;
}
main.landing div.node_select{
margin-bottom:0;
}
main.landing div.node_status {
margin-top:8px;
}
main.landing div.node_status small {
display: block;
}
main.landing .card-body {
padding-bottom: 0.5rem;
}
main.landing .card-body .table {
margin-bottom: 0;
}
main.landing .card-body .table tbody td {
padding-bottom: 0;
}
.dropdown-item {
padding: .1rem .75rem;
font-size: 14px;
}

@ -14,7 +14,7 @@
<li>thrmo <small>(Lead shill)</small></li>
<li>bomb-on <small>(Lead Pool)</small></li>
<li><a href="#" v-on:click="jw">jwintern</a> <small>(CEO)</small></li>
<li>Justin Bieber</li>
<li>Monero community</li>
<li>rbrunner <small>(MMS)</small></li>
<li>Febo</li>
<li>Highdude</li>
@ -40,7 +40,7 @@
</div>
<div class="col-sm-3">
<ul>
<li>vicer0y</li>
<li>vicer0y <small>(wownero.info)</small></li>
<li>@bl4sty</li>
<li>kico <small>(TooL)</small></li>
<li>notmike <small>(popping off)</small></li>
@ -64,8 +64,7 @@
<li>scoobybejesus</li>
<li>kloinka</li>
<li>ilovetron</li>
<li>OhGodAGirl</li>
<li>Gwen Stefani</li>
<li>\x</li>
</ul>
</div>
</div>

@ -7,18 +7,29 @@
<p>Welcome to wownero light!</p>
<ul style="margin-bottom: 22px">
<li>Electron/Vue.js <small>(OSX/Windows/Linux)</small></li>
<li>Remote node only</li>
<li>Works most of the time</li>
</ul>
<button id="create_wallet_btn" v-on:click="createWallet" type="button" class="btn btn-success">
<button id="create_wallet_btn" v-on:click="createWallet" type="button" class="btn btn-success btn-sm">
<i class="fa fa-plus" id="create_wallet_icon" aria-hidden="true"></i>
Create a new wallet
Create wallet
</button>
<button id="x_btn" v-on:click="openWallet" type="button" class="btn btn-success">
<div class="dropdown" style="display: inline-block;">
<button class="btn btn-success btn-sm dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-folder-open" aria-hidden="true"></i>
Open wallet
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a v-on:click="openWallet" class="dropdown-item" href="#">Browse</a>
<a v-on:click="openLastWallet" v-if="cfg_wallet_path !== ''" class="dropdown-item" href="#">{{cfg_wallet_path_name}}</a>
</div>
</div>
<button id="" v-on:click="settings" type="button" class="btn btn-success btn-sm">
<!-- fa fa-refresh fa-spin -->
<i class="fa fa-folder-open" aria-hidden="true"></i>
Open wallet
<i class="fa fa-cog" aria-hidden="true"></i>
Settings
</button>
</div>
@ -26,10 +37,13 @@
<div class="card my-4" style="margin-top: 0 !important;">
<h5 class="card-header">Node</h5>
<div class="card-body node">
<div class="form-group">
<select class="form-control">
<option>node.wowne.ro:34568</option>
<div class="form-group node_select">
<select id="selectnode" class="form-control">
<option :selected="selected_node === node.address" v-bind:value="node.address" v-for="node in nodes">{{node.region}} - {{node.address}}</option>
</select>
<div class="node_status">
<small class="location"></small>
</div>
</div>
</div>
</div>
@ -71,6 +85,9 @@
open(link) {
this.$electron.shell.openExternal(link)
},
settings(){
this.$router.push({name: 'settings'});
},
createWallet(){
// make sure any stale process is killed anyway ;/
ipcRenderer.send('rpc_kill_wallet');
@ -100,9 +117,21 @@
}, 50);
}
});
},
openLastWallet(){
if(!this.cfg_wallet_path || this.cfg_wallet_path === ''){
alert('Invalid wallet path?!');
return;
}
this.$store.commit('addWalletPath', this.cfg_wallet_path);
this.$store.commit('showPassword', {
'message': 'Enter wallet password'
});
}
},
mounted() {
let select_node = jQuery('#selectnode');
const axios = require('axios');
axios.get('https://funding.wownero.com/api/1/convert/wow-usd?amount=1000').then(response => {
this.$store.commit('addRate', response.data.usd);
@ -118,13 +147,10 @@
buttons: ['OK'],
message: `You are running an old instance of wowlight and need to upgrade!\n\nVisit https://light.wownero.com for a shiny new version.`
}
dialog.showMessageBox(dialogOptions, i => {
});
dialog.showMessageBox(dialogOptions, i => {});
}
});
ipcRenderer.send('rpc_get_wowdir');
this.$electron.ipcRenderer.on('rpc_wallet_opening', (event) => {
console.log('opening');
this.$store.commit('showMessage', {
@ -133,7 +159,15 @@
});
});
//this.$router.push({name: 'dashboard'});
select_node.on('change', (fuckme) => {
let address = fuckme.currentTarget.value;
let nodes = this.$store.getters.cfg.nodes;
let node = nodes.find(_node => _node.address === address)
ipcRenderer.send('rpc_cfg_set_node', node.address);
jQuery('.node_status .location').html(`Location: ${node.location}`);
});
},
computed: {
walletDir(){
@ -147,6 +181,19 @@
},
wallet(){
return this.$store.state.wallet;
},
nodes(){
return this.$store.getters.cfg.nodes;
},
selected_node(){
return this.$store.getters.cfg.node;
},
cfg_wallet_path(){
return this.$store.getters.cfg.wallet_path;
},
cfg_wallet_path_name(){
let path = require("path");
return path.basename(this.cfg_wallet_path);
}
}
}

@ -0,0 +1,76 @@
<template>
<main class="credits">
<div class="row">
<div class="col-sm-12">
<div class="row">
<div class="col-sm-12" style="margin-bottom:4px;">
<h4>Settings</h4>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<p>
We started working on this page but got lazy and played videogames instead.
</p>
<p>
If you want customization, download the <a href="https://github.com/wownero/wownero/releases">CLI wallet</a>.
</p>
</div>
</div>
<div class="row" style="margin-top:8px;">
<div class="col-sm-12">
<h4>Custom node</h4>
<p>
Adding your own node is simple; edit the following JSON file:
</p>
<p>
<code>{{pathConfig}}</code>
</p>
<p>
Goodluck!
</p>
</div>
</div>
<div class="row" style="margin-top:14px;">
<div class="col-sm-12">
<button v-on:click="back" type="button" class="btn btn-success btn-sm pull-left">
Go back
</button>
</div>
</div>
</div>
</div>
<wario-settings></wario-settings>
</main>
</template>
<script>
import WarioSettings from './WarioSettings'
export default {
name: 'Settings',
components: {WarioSettings},
beforeRouteLeave(to, from, next) {
next();
},
methods: {
open(link) {
this.$electron.shell.openExternal(link)
},
back(){
this.$router.push({name: 'landing-page'});
}
},
mounted() {
},
computed: {
pathConfig() {
const path = require('path');
return path.join(this.$store.state.wallet_dir, 'wowlight.json');
}
}
}
</script>

@ -17,7 +17,7 @@
<div class="grassfill">
<span class="version">
v{{version}}
{{version}} - <span style="font-size:12px;">{{version_embedded}}</span>
</span>
<a class="credits" href="#" v-on:click="openCredits">
Credits
@ -36,12 +36,10 @@
name: "WarioLanding",
data(){
return {
'version': null
'electron_version': null
}
},
mounted() {
this.version = require('electron').remote.app.getVersion();
let wario = jQuery('.wario_walking_animated');
let window_width = jQuery(window).width();
@ -60,6 +58,14 @@
openCredits(){
this.$router.push({name: 'credits'});
}
},
computed: {
version_embedded(){
return this.$store.state.version_embedded;
},
version(){
return this.$store.state.version;
}
}
}
</script>

@ -0,0 +1,59 @@
<template>
<div class="wario_seq">
<div class="wario_walking_animated">
<div class="wario_walking">
</div>
<div class="coin" style="height: 20px;width: 20px;top:0;right:10px;"></div>
<div class="coin" style="height: 32px;width: 28px;top:14px;right:38px;-webkit-transform: scaleX(-1);"></div>
<div class="coin" style="height: 20px;width: 20px;top:30px;right:22px;"></div>
<div class="coin" style="height: 24px;width: 24px;top:54px;right:32px;"></div>
</div>
<div class="perlsux"></div>
<div class="grass_container">
<div class="grass"></div>
<div class="grassfill">
<span class="version">
{{version}} - <span style="font-size:12px;">{{version_embedded}}</span>
</span>
</div>
</div>
</div>
</template>
<script>
export default {
name: "WarioSettings",
data(){
return {
'electron_version': null
}
},
mounted() {
jQuery('main.credits .perlsux').click((event) => {
this.back();
});
},
methods: {
back(){
this.$router.push({name: 'landing-page'});
},
},
computed: {
version_embedded(){
return this.$store.state.version_embedded;
},
version(){
return this.$store.state.version;
}
}
}
</script>
<style scoped>
</style>

@ -9,7 +9,7 @@
</span>
<span class="amount">
{{Number((proposal.funds_target/100)*proposal.funded_pct).toFixed(2)}} WOW remaining
{{Number((proposal.funds_target - (proposal.funds_target/100)*proposal.funded_pct)).toFixed(2)}} WOW remaining
</span> <small>({{Number(proposal.funded_pct).toFixed(1)}}% funded)</small>
</a>
</td>

@ -81,7 +81,6 @@
_txs_pooled.map((tx, i) => {
_txs.insert(0, tx);
});
// let _txs = [];
return _txs;
}
},

@ -10,7 +10,7 @@
</div>
<div class="form-group">
<label for="password" class="control-label">Wallet password</label>
<input id="password" name="password" type="text" class="form-control" aria-describedby="passwordHelpBlock">
<input id="password" name="password" type="password" class="form-control" aria-describedby="passwordHelpBlock">
<span id="passwordHelpBlock" class="help-block">A wallet password is recommended but not required.</span>
</div>
<div class="form-group">

@ -89,7 +89,8 @@
let path_wallet = path.join(this.walletDir, this.wallet.name);
ipcRenderer.send('rpc_open_wallet', {
path: path_wallet, password: this.wallet.password
path: path_wallet,
password: this.wallet.password
});
this.$router.push({name: 'landing-page'});

@ -36,6 +36,12 @@ let app = new Vue({
this.$store.commit('addWalletDir', data);
});
this.$electron.ipcRenderer.on('rpc_get_cfg', (event, data) => {
console.log('renderer get_cfg');
console.log(data);
this.$store.commit('addCfg', data);
});
this.$electron.ipcRenderer.on('rpc_wallet_created', (event, data) => {
self.$store.commit('appState', null);

@ -39,9 +39,14 @@ export default new Router({
path: '/enter-password',
name: 'enter-password',
component: require('@/components/Landing/EnterPassword').default
},
{
path: '/settings',
name: 'settings',
component: require('@/components/Landing/Settings').default
}
],
beforeEach: () => {
console.log("changed");
}
})
});

@ -1,6 +1,5 @@
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
@ -9,6 +8,11 @@ export default new Vuex.Store({
height_from: 0, // height refreshes
height_to: 0,
wallet_dir: "",
cfg: {
"node": "",
"nodes": [],
"wallet_path": ""
},
created_wallet: {}, // only used when creating wallets
appState: "", // not really used
error: "",
@ -30,9 +34,14 @@ export default new Vuex.Store({
'state': -1
}, // wallet opened
wallet_path: '',
wallet_password: ''
wallet_password: '',
version_embedded: '',
version: require('electron').remote.app.getVersion()
},
mutations: {
addEmbeddedVersion(state, data){
state.version_embedded = data.version;
},
addCreatedWallet({ created_wallet }, data) {
created_wallet.seed = data.seed;
created_wallet.address = data.address;
@ -43,6 +52,24 @@ export default new Vuex.Store({
addWalletDir(state, data){
state.wallet_dir = data;
},
addCfg({cfg}, data){
console.log('store addCfg');
if (typeof data === 'string' || data instanceof String){ // fucku javascript
data = JSON.parse(data);
}
if(data.hasOwnProperty('node')){
cfg.node = data.node;
}
if(data.hasOwnProperty('nodes')){
cfg.nodes = data.nodes;
}
if(data.hasOwnProperty('wallet_path')){
cfg.wallet_path = data.wallet_path;
}
},
appState(state, data){
state.appState = data;
},
@ -109,6 +136,8 @@ export default new Vuex.Store({
message_box: state => state.message_box,
password_box: state => state.password_box,
height_from: state => state.height_from,
height_to: state => state.height_to
height_to: state => state.height_to,
version_embedded: state => state.version_embedded,
cfg: state => state.cfg
}
});