diff --git a/src/app/core-ui/main/main-view.component.ts b/src/app/core-ui/main/main-view.component.ts index 1c0de8f65..113b549e5 100644 --- a/src/app/core-ui/main/main-view.component.ts +++ b/src/app/core-ui/main/main-view.component.ts @@ -118,8 +118,8 @@ export class MainViewComponent implements OnInit { if (sec === 59) { min = min - 1; } - this.time = min + ':' + ('0' + sec).slice(-2); if (min >= 0 && sec >= 0) { + this.time = min + ':' + ('0' + sec).slice(-2); this.unSubscribeTimer = Observable.timer(1000). subscribe(() => this.startTimer(min, sec)); } else { diff --git a/src/app/wallet/wallet/send/send.component.html b/src/app/wallet/wallet/send/send.component.html index a7024336a..fc64ecf6c 100644 --- a/src/app/wallet/wallet/send/send.component.html +++ b/src/app/wallet/wallet/send/send.component.html @@ -26,15 +26,16 @@
Public
-
Available balance: {{ getBalance('balance') }}
+
Available balance: {{ getBalance('balance') }}
Blind
-
Available balance: {{ getBalance('blind_balance') }}
+
Available balance:{{ getBalance('blind_balance') }} +
Anon
-
Available balance: {{ getBalance('anon_balance') }}
+
Available balance:{{ getBalance('anon_balance') }}
@@ -97,7 +98,9 @@
Blind
-
Balance:{{ getBalance('blind_balance') }}
+
Balance:{{ getBalance('blind_balance') }} + +
Anon
diff --git a/src/app/wallet/wallet/send/send.component.scss b/src/app/wallet/wallet/send/send.component.scss index 1e9ec7043..8b0f1bfe0 100644 --- a/src/app/wallet/wallet/send/send.component.scss +++ b/src/app/wallet/wallet/send/send.component.scss @@ -55,6 +55,14 @@ font-weight: 600; margin-left: 5px; } + .help-icon { // explanation of "1e-8" at blind balances (after sending all blind) + margin-left: 3px; + font-size: 14px; + color: $color-info; + line-height: 0; + position: relative; + top: 2px; + } } } diff --git a/src/app/wallet/wallet/send/send.component.ts b/src/app/wallet/wallet/send/send.component.ts index 6999bb88b..990da48e5 100644 --- a/src/app/wallet/wallet/send/send.component.ts +++ b/src/app/wallet/wallet/send/send.component.ts @@ -33,6 +33,7 @@ export class SendComponent { advanced: boolean = false; progress: number = 10; advancedText: string = 'Advanced options' + isBlind: boolean = false; // TODO: Create proper Interface / type send: any = { input: 'balance', @@ -85,6 +86,12 @@ export class SendComponent { return this._rpc.state.get(account) || 0; } + checkBalance(account: string): boolean { + if (account === 'blind_balance') { + return parseFloat(this._rpc.state.get(account)) < 0.0001 && parseFloat(this._rpc.state.get(account)) > 0; + } + } + /** Get the send address */ getAddress(): string { if (this.type === 'sendPayment') { diff --git a/src/app/wallet/wallet/shared/transaction.service.ts b/src/app/wallet/wallet/shared/transaction.service.ts index 8214a5317..567f315de 100644 --- a/src/app/wallet/wallet/shared/transaction.service.ts +++ b/src/app/wallet/wallet/shared/transaction.service.ts @@ -51,7 +51,7 @@ export class TransactionService { this.rpc.state.observe('txcount') .subscribe( txcount => { - if (txcount > this.txCount || txcount === 1) { + if (txcount > this.txCount || (txcount === 1 && this.txCount === 0)) { this.txCount = txcount; this.newTransaction(); } else {