From 317aa4c6244785d4f957cc3c670e2fc8bdd326c4 Mon Sep 17 00:00:00 2001 From: Adinael Perez Ruelas Date: Tue, 11 Jun 2019 13:28:13 -0600 Subject: [PATCH] web-ui: Add a column for label the richest addresses Add a column in the richest-addresses component Update address title --- web-ui/src/app/app.component.ts | 1 + .../address-details/address-details.component.html | 4 +++- .../components/address-details/address-details.component.ts | 2 ++ .../richest-addresses/richest-addresses.component.html | 4 ++++ .../richest-addresses/richest-addresses.component.ts | 6 +++--- web-ui/src/app/config.ts | 6 ++++++ 6 files changed, 19 insertions(+), 4 deletions(-) diff --git a/web-ui/src/app/app.component.ts b/web-ui/src/app/app.component.ts index cdc4d15..a5861ff 100644 --- a/web-ui/src/app/app.component.ts +++ b/web-ui/src/app/app.component.ts @@ -145,6 +145,7 @@ export class AppComponent implements OnInit { 'label.richestAddresses': 'Richest addresses', 'label.masternodes': 'Masternodes', 'label.percentOfCoins': 'Percent of coins', + 'label.addressLabel': 'Label', 'label.protocol': 'Protocol', 'label.status': 'Status', 'label.lastSeen': 'Last seen', diff --git a/web-ui/src/app/components/address-details/address-details.component.html b/web-ui/src/app/components/address-details/address-details.component.html index 3297a21..1bedcb9 100644 --- a/web-ui/src/app/components/address-details/address-details.component.html +++ b/web-ui/src/app/components/address-details/address-details.component.html @@ -4,7 +4,9 @@
-

{{'label.address' | translate}}

+

{{'label.address' | translate}}

+

{{ addressLabel[addressString]}}

+
diff --git a/web-ui/src/app/components/address-details/address-details.component.ts b/web-ui/src/app/components/address-details/address-details.component.ts index 616b005..67e0a01 100644 --- a/web-ui/src/app/components/address-details/address-details.component.ts +++ b/web-ui/src/app/components/address-details/address-details.component.ts @@ -9,6 +9,7 @@ import { ErrorService } from '../../services/error.service'; import { LightWalletTransaction } from '../..//models/light-wallet-transaction'; import { getNumberOfRowsForScreen } from '../../utils'; +import { addressLabels } from '../../config'; @Component({ selector: 'app-address-details', @@ -19,6 +20,7 @@ export class AddressDetailsComponent implements OnInit { address: Balance; addressString: string; + addressLabel = addressLabels; // pagination limit = 30; diff --git a/web-ui/src/app/components/richest-addresses/richest-addresses.component.html b/web-ui/src/app/components/richest-addresses/richest-addresses.component.html index 7fd02e5..7dece8e 100644 --- a/web-ui/src/app/components/richest-addresses/richest-addresses.component.html +++ b/web-ui/src/app/components/richest-addresses/richest-addresses.component.html @@ -11,6 +11,7 @@ {{'label.address' | translate}} {{'label.amount' | translate}} {{'label.percentOfCoins' | translate}} + {{'label.addressLabel' | translate}} @@ -35,6 +36,9 @@ {{getPercent(item) | number:'1.2-2'}} %
+ + {{addressLabel[item.address]}} + diff --git a/web-ui/src/app/components/richest-addresses/richest-addresses.component.ts b/web-ui/src/app/components/richest-addresses/richest-addresses.component.ts index 26e0b1e..1f333f8 100644 --- a/web-ui/src/app/components/richest-addresses/richest-addresses.component.ts +++ b/web-ui/src/app/components/richest-addresses/richest-addresses.component.ts @@ -2,9 +2,6 @@ import {tap} from 'rxjs/operators'; import { Component, OnInit, OnDestroy, HostListener } from '@angular/core'; - - - import { Balance } from '../../models/balance'; import { BalancesService } from '../../services/balances.service'; @@ -12,6 +9,7 @@ import { TickerService } from '../../services/ticker.service'; import { ServerStats } from '../../models/ticker'; import { getNumberOfRowsForScreen } from '../../utils'; +import { addressLabels } from '../../config'; @Component({ selector: 'app-richest-addresses', @@ -27,6 +25,8 @@ export class RichestAddressesComponent implements OnInit { limit = 30; items: Balance[] = []; + addressLabel = addressLabels; + constructor( private balancesService: BalancesService, private tickerService: TickerService) { } diff --git a/web-ui/src/app/config.ts b/web-ui/src/app/config.ts index 9971943..8080a0b 100644 --- a/web-ui/src/app/config.ts +++ b/web-ui/src/app/config.ts @@ -1,3 +1,9 @@ export class Config { static currentCurrency = 'XSN'; } + +export const addressLabels = { + '7jqffPwhzkVGbYFf525muhas6uVrhERwAm': 'Cryptopia', + '7iYWrbBhYczSYPZ3Naesd9Yk4X5qn4dNAg': 'Livecoin', + 'Xi1BEVHFRYg1QQfrNJF8L9yXvREAADxCLk': 'Stakenet.io Cloud Staking' +};