Skip to content

Commit

Permalink
Hot fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nazar Usov authored and Nazar Usov committed Feb 23, 2024
1 parent 66dea6f commit 0172a64
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 18 deletions.
3 changes: 1 addition & 2 deletions html_source/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"schematics": {
"@schematics/angular:component": {
"style": "scss",
"skipTests": true,
"standalone": true
"skipTests": true
}
},
"architect": {
Expand Down
24 changes: 13 additions & 11 deletions html_source/src/app/pages/wallet/tabs/assets/assets.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,20 +184,22 @@ import { defaultImgSrc, zanoAssetInfo } from '@parts/data/assets';
</button>
</li>
<li class="item" *ngIf="variablesService.currentWallet.loaded && variablesService.daemon_state === 2 && !variablesService.currentWallet.is_auditable && !variablesService.currentWallet.is_watch_only">
<a routerLink="/wallet/send" [state]="{ asset: currentAsset }" class="w-100 px-2 py-1">
<i class="icon arrow-up-square mr-1"></i>
<span>{{ 'Send' | translate }}</span>
</a>
</li>
<ng-container *ngIf="variablesService.currentWallet.loaded && variablesService.daemon_state === 2 && (variablesService.is_hardfok_active$ | async)">
<ng-container *ngIf="variablesService.currentWallet.loaded && variablesService.daemon_state === 2 && !variablesService.currentWallet.is_auditable && !variablesService.currentWallet.is_watch_only && !variablesService.currentWallet.isEmpty">
<li class="item">
<a routerLink="/wallet/create-swap" [state]="{ asset: currentAsset }" class="w-100 px-2 py-1">
<i class="icon swap mr-1"></i>
<span>{{ 'Swap' | translate }}</span>
<a routerLink="/wallet/send" [state]="{ asset: currentAsset }" class="w-100 px-2 py-1">
<i class="icon arrow-up-square mr-1"></i>
<span>{{ 'Send' | translate }}</span>
</a>
</li>
<ng-container *ngIf="(variablesService.is_hardfok_active$ | async)">
<li class="item">
<a routerLink="/wallet/create-swap" [state]="{ asset: currentAsset }" class="w-100 px-2 py-1">
<i class="icon swap mr-1"></i>
<span>{{ 'Swap' | translate }}</span>
</a>
</li>
</ng-container>
</ng-container>
<ng-container *ngIf="currentAsset.asset_info.ticker !== 'ZANO'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ import { zanoAssetInfo } from '@parts/data/assets';
</ng-container>
<ng-container
*ngSwitchCase="!(transaction.remote_addresses?.length || transaction.remote_aliases?.length) && transaction.tx_type !== 5"
*ngSwitchCase="!(transaction.remote_addresses?.length || transaction.remote_aliases?.length) && ![4,5,6,7,8,10,11,12].includes(transaction.tx_type)"
>
{{ 'HISTORY.HIDDEN' | translate }}
</ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class AssetDetailsComponent implements OnInit {

ngZone = inject(NgZone);

zano_current_supply = null;
zano_current_supply = 'Unknown';

constructor(
public variablesService: VariablesService,
Expand Down Expand Up @@ -144,10 +144,10 @@ export class AssetDetailsComponent implements OnInit {
};

this.backendService.call_rpc(params1, (status1, response_data1) => {
if (response_data1.result.status === 'OK') {
if (response_data1?.result?.status === 'OK') {
this.backendService.call_rpc(params2, (status2, response_data2) => {
this.ngZone.run(() => {
this.zano_current_supply = response_data2?.['result']?.['total_coins'] ?? null;
this.zano_current_supply = response_data2?.['result']?.['total_coins'] ?? 'Unknown';
});
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class HistoryTypeMessagesPipe implements PipeTransform {
case 5:
return this.translate.instant('HISTORY.TYPE_MESSAGES.UPDATE_ALIAS');
case 6:
return item.td['spn'] && item.td['spn'].length
return item.td?.['spn']?.length
? this.translate.instant('HISTORY.TYPE_MESSAGES.POS_REWARD')
: this.translate.instant('HISTORY.TYPE_MESSAGES.POW_REWARD');
case 7:
Expand Down

0 comments on commit 0172a64

Please sign in to comment.