Commit 30e8c86b authored by Pieterjan Vanhoof's avatar Pieterjan Vanhoof Committed by GitHub

Merge pull request #286 from stratisproject/ui

Show fee in transaction details, shutdown daemons on OS X quit, fix password validation, fix stdout logging
parents 137a7130 cc1c1a9d
......@@ -105,7 +105,8 @@ app.on('activate', function () {
});
function closeBitcoinApi() {
if (process.platform !== 'darwin' && !serve) {
// if (process.platform !== 'darwin' && !serve) {
if (!serve) {
var http1 = require('http');
const options1 = {
hostname: 'localhost',
......@@ -121,7 +122,8 @@ function closeBitcoinApi() {
};
function closeStratisApi() {
if (process.platform !== 'darwin' && !serve) {
// if (process.platform !== 'darwin' && !serve) {
if (process.platform !== 'darwin' && !serve) {
var http2 = require('http');
const options2 = {
hostname: 'localhost',
......@@ -148,15 +150,10 @@ function startBitcoinApi() {
bitcoinProcess = spawnBitcoin(apiPath, ['-testnet'], {
detached: true
}, (error, stdout, stderr) => {
if (error) {
writeLogError(`exec error: ${error}`);
return;
}
if (serve) {
writeLog(`stdout: ${stdout}`);
writeLog(`stderr: ${stderr}`);
}
});
bitcoinProcess.stdout.on('data', (data) => {
writeLog(`Bitcoin: ${data}`);
});
}
......@@ -172,15 +169,10 @@ function startStratisApi() {
stratisProcess = spawnStratis(apiPath, ['stratis', '-testnet'], {
detached: true
}, (error, stdout, stderr) => {
if (error) {
writeLogError(`exec error: ${error}`);
return;
}
if (serve) {
writeLog(`stdout: ${stdout}`);
writeLog(`stderr: ${stderr}`);
}
});
stratisProcess.stdout.on('data', (data) => {
writeLog(`Stratis: ${data}`);
});
}
......@@ -226,10 +218,6 @@ function writeLog(msg) {
console.log(msg);
};
function writeLogError(msg) {
console.error(msg);
};
function createMenu() {
const Menu = electron.Menu;
......
......@@ -8,12 +8,17 @@ export class PasswordValidationDirective {
constructor() { }
static MatchPassword(AC: AbstractControl) {
AC.get('walletPassword').valueChanges.subscribe(() => {
AC.get('walletPasswordConfirmation').updateValueAndValidity();
});
let password = AC.get('walletPassword').value;
let confirmPassword = AC.get('walletPasswordConfirmation').value;
if(password != confirmPassword) {
AC.get('walletPasswordConfirmation').setErrors( { walletPasswordConfirmation: true } )
AC.get('walletPasswordConfirmation').setErrors({ walletPasswordConfirmation: true });
} else {
return null
}
}
}
\ No newline at end of file
}
......@@ -15,10 +15,10 @@
<li *ngIf="transaction.transactionType == 'received'" class="list-inline-item col-8 blockText text-success">{{ transaction.transactionAmount | coinNotation }} {{ coinUnit }}</li>
<li *ngIf="transaction.transactionType == 'sent'" class="list-inline-item col-8 blockText text-danger">-{{ transaction.transactionAmount + transaction.transactionFee | coinNotation }} {{ coinUnit }}</li>
</ul>
<!-- <ul class="list-inline row" *ngIf="transaction.transactionType == 'sent'">
<ul class="list-inline row" *ngIf="transaction.transactionType == 'sent'">
<li class="list-inline-item col blockLabel">Fee</li>
<li *ngIf="transaction.transactionType == 'sent'" class="list-inline-item col-8 blockText text-danger">{{ transaction.transactionFee | coinNotation }} {{ coinUnit }}</li>
</ul> -->
</ul>
<ul class="list-inline row">
<li class="list-inline-item col blockLabel">Date</li>
<li class="list-inline-item col-8 blockText">{{ transaction.transactionTimestamp * 1000 | date:'medium' }}</li>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment