<commit_before>import { Component, EventEmitter, Input, Output } from '@angular/core';
import { Router } from '@angular/router';

import { Client } from '../../../services/api';
import { BlockchainService } from '../../blockchain/blockchain.service';
import { WalletService } from '../../../services/wallet';

@Component({
  selector: 'm-wallet--flyout',
  templateUrl: 'flyout.component.html'
})

export class WalletFlyoutComponent {

  address: string;
  balance: any = {
    points: -1,
    money: -1,
    tokens: -1
  };

  @Output('close') closeEvt: EventEmitter<any> = new EventEmitter();

  showAnnouncement = true;

  constructor(
    private router: Router,
    public client: Client,
    public wallet: WalletService,
    public blockchain: BlockchainService,
  ) {

  }

  ngOnInit() {
    this.loadBalances();
  }

  setUpCryptoWallet() {
    this.router.navigate(['/wallet/crypto/overview', { auto: 1 }]);
    this.address = void 0;
  }

  closeMessage() {
    this.showAnnouncement = false;
  }

  close() {
    this.closeEvt.emit(true);
  }

  loadBalances() {
    //TODO: return in one request?
    let requests = [
    //this.client.get('api/v1/monetization/revenue/overview').catch(() => false),
      this.wallet.getBalance(true).catch(() => false),
      this.blockchain.getBalance(true).catch(() => false)
    ];

    Promise.all(requests)
      .then((results: Array<any>) => {
        if (results[0]) {
          this.balance.points = results[0].balance;
        }

        if (results[1] !== false) {
          this.balance.tokens = results[2];
        }

        this.balance.points = this.wallet.points;

        this.balance = Object.assign({}, this.balance);
<commit_msg>(fix): show crypto value<commit_after>import { Component, EventEmitter, Input, Output } from '@angular/core';
import { Router } from '@angular/router';

import { Client } from '../../../services/api';
import { BlockchainService } from '../../blockchain/blockchain.service';
import { WalletService } from '../../../services/wallet';

@Component({
  selector: 'm-wallet--flyout',
  templateUrl: 'flyout.component.html'
})

export class WalletFlyoutComponent {

  address: string;
  balance: any = {
    points: -1,
    money: -1,
    tokens: -1
  };

  @Output('close') closeEvt: EventEmitter<any> = new EventEmitter();

  showAnnouncement = true;

  constructor(
    private router: Router,
    public client: Client,
    public wallet: WalletService,
    public blockchain: BlockchainService,
  ) {

  }

  ngOnInit() {
    this.loadBalances();
  }

  setUpCryptoWallet() {
    this.router.navigate(['/wallet/crypto/overview', { auto: 1 }]);
    this.address = void 0;
  }

  closeMessage() {
    this.showAnnouncement = false;
  }

  close() {
    this.closeEvt.emit(true);
  }

  loadBalances() {
    //TODO: return in one request?
    let requests = [
    //this.client.get('api/v1/monetization/revenue/overview').catch(() => false),
      this.wallet.getBalance(true).catch(() => false),
      this.blockchain.getBalance(true).catch(() => false)
    ];

    Promise.all(requests)
      .then((results: Array<any>) => {
        if (results[0]) {
          this.balance.points = results[0].balance;
        }

        if (results[1] !== false) {
          this.balance.tokens = results[1];
        }

        this.balance.points = this.wallet.points;

        this.balance = Object.assign({}, this.balance);

{'fraction_non_alphanumeric': 0.16515107069521853, 'fraction_numerical': 0.005866823115283074, 'mean_word_length': 2.8228699551569507, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2973387', 'n_tokens_mistral': 1097, 'n_tokens_neox': 1080, 'n_words': 215}