1
0
Fork 0
forked from lthn/blockchain

fix update status wallet (#259)

* add disabled btn setting_wallet

* add build html

* fix update status wallet
This commit is contained in:
Nazar 2020-12-03 22:15:01 +02:00 committed by GitHub
parent e02c269c17
commit 1e0d085727
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -16,7 +16,7 @@
</div>
</div>
<div>
<button [routerLink]="['/details']" routerLinkActive="active" tooltip="{{ 'WALLET.TOOLTIPS.SETTINGS' | translate }}" placement="left" tooltipClass="table-tooltip account-tooltip" [delay]="500" [timeDelay]="500" [disabled]="variablesService.daemon_state !== 2">
<button [routerLink]="['/details']" routerLinkActive="active" tooltip="{{ 'WALLET.TOOLTIPS.SETTINGS' | translate }}" placement="left" tooltipClass="table-tooltip account-tooltip" [delay]="500" [timeDelay]="500" [disabled]="variablesService.daemon_state !== 2 || !walletLoaded">
<i class="icon details"></i>
</button>
</div>

View file

@ -27,6 +27,7 @@ export class WalletComponent implements OnInit, OnDestroy {
copyAnimation = false;
copyAnimationTimeout;
balanceTooltip;
walletLoaded;
activeTab = 'history';
public mining = false;
public currentPage = 1;
@ -203,6 +204,7 @@ export class WalletComponent implements OnInit, OnDestroy {
this.variablesService.currentWallet.wakeAlias = false;
}
});
this.updateWalletStatus();
}
resetPaginationValues() {
this.ngZone.run(() => {
@ -369,4 +371,13 @@ export class WalletComponent implements OnInit, OnDestroy {
clearTimeout(this.copyAnimationTimeout);
}
updateWalletStatus() {
this.backend.eventSubscribe('update_wallet_status', (data) => {
const wallet_state = data.wallet_state;
this.walletLoaded = false;
if (wallet_state === 2) {
this.walletLoaded = true;
}
});
}
}