Skip to content

Commit

Permalink
release V1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BitHaru committed Nov 1, 2021
1 parent 302a167 commit 44584b2
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web-wallet",
"version": "1.2.0",
"version": "1.3.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down
11 changes: 11 additions & 0 deletions src/app/components/account-details/account-details.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ <h3 class="uk-card-title uk-text-truncate" style="margin-bottom: 0;">{{ address
<div class="uk-padding-small" uk-grid>
<div class="uk-width-1-1">
<div uk-grid>
<div *ngIf="getAlias()" class="uk-width-1-1">
<div uk-grid>
<div class="uk-width-2-5 uk-text-left">
{{ 'Alias' | translate }}
</div>
<div class="uk-width-3-5 uk-text-left">
{{ getAlias() }} <span *ngIf="dnsValid()" uk-icon="icon: check; ratio: 0.8;" class="uk-text-success" uk-tooltip title="{{ 'Account verified' | translate }}"></span><span *ngIf="dnsInvalid()" uk-icon="icon: warning; ratio: 0.8;" class="uk-text-warning" uk-tooltip title="{{ 'Account unverified' | translate }}"></span>
</div>
</div>
</div>

<div class="uk-width-1-1">
<div uk-grid>
<div class="uk-width-2-5 uk-text-left">
Expand Down
22 changes: 22 additions & 0 deletions src/app/components/account-details/account-details.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Block, BlockInfo } from '../../services/blocks.service';
import { ServerService } from '../../services/server.service';
import { TranslateService } from '@ngx-translate/core';
import { marker } from '@biesbjerg/ngx-translate-extract-marker';
import { AliasService } from '../../services/alias.service';

@Component({
selector: 'app-account-details',
Expand All @@ -24,15 +25,18 @@ export class AccountDetailsComponent implements OnInit {
private translate: TranslateService,
private wallets: WalletsService,
private server: ServerService,
private alias: AliasService,
private notification: NotificationService) {

}

ngOnInit(): void {
this.address = this.route.snapshot.params.address;
if (!this.address.startsWith('rai_') || this.address.length !== 64) return;
if (!this.wallets.getRecentBlocksSize(this.address)) {
this.wallets.setRecentBlocksSize(10, this.address);
}
this.alias.addAccount(this.address);
}

copied() {
Expand Down Expand Up @@ -92,4 +96,22 @@ export class AccountDetailsComponent implements OnInit {
this.wallets.setRecentBlocksSize(size + 10, this.address);
}

getAlias(): string {
if (!this.address) return '';
return this.alias.alias(this.address);
}

dnsValid(): boolean {
if (!this.address) return false;
if (!this.alias.dns(this.address)) return false;
if (!this.alias.verified(this.address)) return false;
return this.alias.dnsValid(this.address);
}

dnsInvalid(): boolean {
if (!this.address) return false;
if (!this.alias.dns(this.address)) return false;
if (!this.alias.verified(this.address)) return false;
return !this.alias.dnsValid(this.address);
}
}
2 changes: 1 addition & 1 deletion src/app/components/send/send.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class SendComponent implements OnInit {
private subAccountRegex = /^(rai_[13456789abcdefghijkmnopqrstuwxyz]{60})_(.+)$/u;
private aliasRegex = /^(.+)<(rai_[13456789abcdefghijkmnopqrstuwxyz]{60})>$/u;
private subAliasRegex = /^(.+)<(rai_[13456789abcdefghijkmnopqrstuwxyz]{60})>_(.+)$/u;
private dnsRegexp = /^([a-z0-9-]{1,63}\.)+[a-z]{2,}$/i;
private dnsRegexp = /^[a-z0-9][a-z0-9-\.]{0,252}$/i;

@ViewChild('destinationDropdown') destinationDropdown! : ElementRef;
@ViewChild('destinationInput') destinationInput! : ElementRef;
Expand Down
5 changes: 3 additions & 2 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
"Languages": "Languages",
"Account Details": "Account Details",
"Copy Account Address": "Copy Account Address",
"Alias": "Alias",
"Account verified": "Account verified",
"Account unverified": "Account unverified",
"Credit": "Credit",
"Daily Txns": "Daily Txns",
"Increase Limit": "Increase Limit",
Expand Down Expand Up @@ -169,14 +172,12 @@
"No receivable transactions": "No receivable transactions",
"Send Raicoin": "Send Raicoin",
"Destination Account": "Destination Account",
"Account verified": "Account verified",
"Account to send to": "Account to send to",
"Amount of RAI to send": "Amount of RAI to send",
"Note/Memo": "Note/Memo",
"extra info, such as exchange's user id": "extra info, such as exchange's user id",
"You are about to send": "You are about to send",
"From Account": "From Account",
"Alias": "Alias",
"Current Balance": "Current Balance",
"To Account": "To Account",
"Subaccount": "Subaccount",
Expand Down
5 changes: 3 additions & 2 deletions src/assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
"Languages": "Idiomas",
"Account Details": "detalles de la cuenta",
"Copy Account Address": "Copiar dirección de cuenta",
"Alias": "Alias",
"Account verified": "Cuenta verificada",
"Account unverified": "Cuenta no verificada",
"Credit": "Crédito",
"Daily Txns": "Txns diarios",
"Increase Limit": "Aumentar el límite",
Expand Down Expand Up @@ -169,14 +172,12 @@
"No receivable transactions": "Sin transacciones por cobrar",
"Send Raicoin": "Enviar Raicoin",
"Destination Account": "cuenta de destino",
"Account verified": "Cuenta verificada",
"Account to send to": "Cuenta a la que enviar",
"Amount of RAI to send": "Cantidad de RAI para enviar",
"Note/Memo": "Nota / Memo",
"extra info, such as exchange's user id": "información adicional, como la identificación de usuario de Exchange",
"You are about to send": "Estás a punto de enviar",
"From Account": "De la cuenta",
"Alias": "Alias",
"Current Balance": "Saldo actual",
"To Account": "A la cuenta",
"Subaccount": "Sub-cuenta",
Expand Down
5 changes: 3 additions & 2 deletions src/assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
"Languages": "Langues",
"Account Details": "Détails du compte",
"Copy Account Address": "Copier l'adresse du compte",
"Alias": "Alias",
"Account verified": "Compte vérifié",
"Account unverified": "Compte non vérifié",
"Credit": "Crédit",
"Daily Txns": "Txns quotidiens",
"Increase Limit": "Augmenter la limite",
Expand Down Expand Up @@ -169,14 +172,12 @@
"No receivable transactions": "Aucune transaction à recevoir",
"Send Raicoin": "Envoyer Raicoin",
"Destination Account": "Compte de destination",
"Account verified": "Compte vérifié",
"Account to send to": "Compte à envoyer",
"Amount of RAI to send": "Montant de RAI à envoyer",
"Note/Memo": "Remarque / Mémo",
"extra info, such as exchange's user id": "des informations supplémentaires, telles que l'ID utilisateur de l'échange",
"You are about to send": "Vous êtes sur le point d'envoyer",
"From Account": "Du compte",
"Alias": "Alias",
"Current Balance": "Solde actuel",
"To Account": "Estimer",
"Subaccount": "Sous-compte",
Expand Down
5 changes: 3 additions & 2 deletions src/assets/i18n/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
"Languages": "Bahasa",
"Account Details": "Detail akun",
"Copy Account Address": "Salin Alamat Akun",
"Alias": "Alias",
"Account verified": "Akun terverifikasi",
"Account unverified": "Akun belum diverifikasi",
"Credit": "Kredit",
"Daily Txns": "Transaksi harian",
"Increase Limit": "Tingkatkan Batas",
Expand Down Expand Up @@ -169,14 +172,12 @@
"No receivable transactions": "Tidak ada transaksi yang dapat diterima",
"Send Raicoin": "Kirim Raicoin",
"Destination Account": "Akun Tujuan",
"Account verified": "Akun terverifikasi",
"Account to send to": "Akun tujuan pengiriman",
"Amount of RAI to send": "Jumlah RAI yang akan dikirim",
"Note/Memo": "Catatan / Memo",
"extra info, such as exchange's user id": "info tambahan, seperti id pengguna pada exchanger/bursa",
"You are about to send": "Anda akan mengirim",
"From Account": "Dari akun",
"Alias": "Alias",
"Current Balance": "Saldo saat ini",
"To Account": "Ke rekening",
"Subaccount": "Sub-akun",
Expand Down
5 changes: 3 additions & 2 deletions src/assets/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
"Languages": "Языки",
"Account Details": "Детали учетной записи",
"Copy Account Address": "Копировать адрес аккаунта",
"Alias": "Псевдоним",
"Account verified": "Аккаунт подтвержден",
"Account unverified": "Аккаунт не подтвержден",
"Credit": "Кредит",
"Daily Txns": "Ежедневные Txns",
"Increase Limit": "Увеличить предел",
Expand Down Expand Up @@ -169,14 +172,12 @@
"No receivable transactions": "Нет операций с получением",
"Send Raicoin": "Отправить Raicoin",
"Destination Account": "Целевая учетная запись",
"Account verified": "Аккаунт подтвержден",
"Account to send to": "Аккаунт для отправки",
"Amount of RAI to send": "Сумма RAI для отправки",
"Note/Memo": "Примечание / памятка",
"extra info, such as exchange's user id": "дополнительная информация, такая как идентификатор пользователя биржи",
"You are about to send": "Вы собираетесь отправить",
"From Account": "Из аккаунта",
"Alias": "Псевдоним",
"Current Balance": "Текущий баланс",
"To Account": "На счет",
"Subaccount": "Субсчет",
Expand Down
5 changes: 3 additions & 2 deletions src/assets/i18n/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
"Languages": "Languages",
"Account Details": "Account Details",
"Copy Account Address": "Copy Account Address",
"Alias": "Alias",
"Account verified": "Account verified",
"Account unverified": "Account unverified",
"Credit": "Credit",
"Daily Txns": "Daily Txns",
"Increase Limit": "Increase Limit",
Expand Down Expand Up @@ -169,14 +172,12 @@
"No receivable transactions": "No receivable transactions",
"Send Raicoin": "Send Raicoin",
"Destination Account": "Destination Account",
"Account verified": "Account verified",
"Account to send to": "Account to send to",
"Amount of RAI to send": "Amount of RAI to send",
"Note/Memo": "Note/Memo",
"extra info, such as exchange's user id": "extra info, such as exchange's user id",
"You are about to send": "You are about to send",
"From Account": "From Account",
"Alias": "Alias",
"Current Balance": "Current Balance",
"To Account": "To Account",
"Subaccount": "Subaccount",
Expand Down
5 changes: 3 additions & 2 deletions src/assets/i18n/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
"Languages": "Ngôn ngữ",
"Account Details": "Chi tiết tài khoản",
"Copy Account Address": "Sao chép địa chỉ tài khoản",
"Alias": "Bí danh",
"Account verified": "Đã xác minh tài khoản",
"Account unverified": "Tài khoản chưa được xác minh",
"Credit": "tín dụng",
"Daily Txns": "Txns hàng ngày",
"Increase Limit": "Tăng giới hạn",
Expand Down Expand Up @@ -169,14 +172,12 @@
"No receivable transactions": "Không có giao dịch đang chờ nhận",
"Send Raicoin": "Gửi Raicoin",
"Destination Account": "Tài khoản đích",
"Account verified": "Đã xác minh tài khoản",
"Account to send to": "Tài khoản để gửi đến",
"Amount of RAI to send": "Số lượng RAI cần gửi",
"Note/Memo": "Ghi chú / Ghi nhớ",
"extra info, such as exchange's user id": "thông tin bổ sung, chẳng hạn như ID người dùng của sàn giao dịch",
"You are about to send": "Bạn sắp gửi",
"From Account": "Từ tài khoản",
"Alias": "Bí danh",
"Current Balance": "Số dư Hiện tại",
"To Account": "Tới tài khoản",
"Subaccount": "Tài khoản phụ",
Expand Down
5 changes: 3 additions & 2 deletions src/assets/i18n/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
"Languages": "语言",
"Account Details": "帐户详细资料",
"Copy Account Address": "复制帐户地址",
"Alias": "别名",
"Account verified": "帐户已验证",
"Account unverified": "帐户未验证",
"Credit": "信用",
"Daily Txns": "每日交易次数",
"Increase Limit": "增加限额",
Expand Down Expand Up @@ -169,14 +172,12 @@
"No receivable transactions": "无应收账款交易",
"Send Raicoin": "发送Raicoin",
"Destination Account": "目标账户",
"Account verified": "帐户已验证",
"Account to send to": "发送到帐户",
"Amount of RAI to send": "发送的RAI金额",
"Note/Memo": "备注/备忘录",
"extra info, such as exchange's user id": "额外信息,例如交易所的用户ID",
"You are about to send": "您即将发送",
"From Account": "从帐户",
"Alias": "别名",
"Current Balance": "当前余额",
"To Account": "到账户",
"Subaccount": "子帐户",
Expand Down

0 comments on commit 44584b2

Please sign in to comment.