Skip to content
Merged

Fixes #171

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion html_source/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"prettier-eslint": "^15.0.1",
"qrcode": "^1.5.1",
"rxjs": "~7.5.7",
"save-dev": "0.0.1-security",
"tslib": "^2.4.1",
"zone.js": "~0.12.0",
"stylus": "github:stylus/stylus#0.59.0"
Expand Down
16 changes: 0 additions & 16 deletions html_source/src/app/api/models/custom-asstest.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,6 @@ export interface DeployAssetParams {
destinations: Destinations;
}

export interface ResponseDeployAsset {
id: number;
jsonrpc: string;
result: {
new_asset_id: string;
result_tx: string;
};
}

export interface UpdateAssetParams {
asset_descriptor: Partial<AssetDescriptor>;
asset_id: string;
Expand All @@ -41,10 +32,3 @@ export interface EmitParams {
asset_id: string;
}

export interface ResponseUpdateAsset {
id: number;
jsonrpc: string;
result: {
result_tx: string;
};
}
7 changes: 1 addition & 6 deletions html_source/src/app/api/models/wallet.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export class Wallet {

total_history_item?: number;

pages: unknown[] = [];
pages: any[] = [];

totalPages!: number;

Expand Down Expand Up @@ -332,11 +332,6 @@ export class Wallet {
return this.balances.find(({ asset_info: { ticker } }) => ticker === searchTicker);
}

getMoneyEquivalentForZano(equivalent): string {
const balanceZano = this.getBalanceByTicker('ZANO')?.total || 0;
return new BigNumber(balanceZano).multipliedBy(equivalent).toFixed(0);
}

prepareHistory(items: Transaction[]): void {
for (let i = 0; i < items.length; i++) {
if (
Expand Down
18 changes: 7 additions & 11 deletions html_source/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
<router-outlet
*ngIf="[0, 1, 2, 6].includes(variablesService.daemon_state) && !(zanoLoadersService.getState('fullScreen') | async)"
*ngIf="allowedDaemonStates.includes(variablesService.daemon_state) && !(zanoLoadersService.getState('fullScreen') | async)"
></router-outlet>

<!-- Synch / Error / Complete States -->
<section *ngIf="[3, 4, 5].includes(variablesService.daemon_state)" aria-busy="true" aria-live="polite" class="preloader" role="status">
<p *ngIf="variablesService.daemon_state === 3" class="mb-2">
{{ 'SIDEBAR.SYNCHRONIZATION.LOADING' | translate }}
</p>
<p *ngIf="variablesService.daemon_state === 4" class="mb-2">
{{ 'SIDEBAR.SYNCHRONIZATION.ERROR' | translate }}
</p>
<p *ngIf="variablesService.daemon_state === 5" class="mb-2">
{{ 'SIDEBAR.SYNCHRONIZATION.COMPLETE' | translate }}
<!-- Sync / Error / Complete States -->
<section *ngIf="loadingDaemonStates.includes(variablesService.daemon_state)" aria-busy="true" aria-live="polite" class="preloader" role="status">
<p class="mb-2">
{{ loadingMessageKey | translate }}
</p>
<div aria-hidden="true" class="loading-bar"></div>
</section>
Expand All @@ -24,6 +18,8 @@
<div aria-hidden="true" class="loading-bar"></div>
</section>

<!-- Register Context Templates -->
<app-register-context-templates></app-register-context-templates>

<!-- Open Wallet Modal -->
<app-open-wallet-modal *ngIf="needOpenWallets.length" [wallets]="needOpenWallets"></app-open-wallet-modal>
195 changes: 104 additions & 91 deletions html_source/src/app/app.component.ts

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions html_source/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { FormsModule } from '@angular/forms';
import { RegisterContextTemplatesComponent } from '@parts/components/register-context-templates.component';
import { DEFAULT_DIALOG_CONFIG, DialogConfig } from '@angular/cdk/dialog';
import { MatIconRegistry } from '@angular/material/icon';
import { zanoIcons } from '../assets/zano-icons';
import { svgIcons } from '../assets/zano-icons';
import { MAT_DIALOG_DEFAULT_OPTIONS, MatDialogConfig, MatDialogModule } from '@angular/material/dialog';

function highchartsFactory(): any[] {
Expand All @@ -36,14 +36,14 @@ const provideHighchartsFactory = {
useFactory: highchartsFactory,
};

function HttpLoaderFactory(httpClient: HttpClient): TranslateHttpLoader {
function httpLoaderFactory(httpClient: HttpClient): TranslateHttpLoader {
return new TranslateHttpLoader(httpClient, './assets/i18n/', '.json');
}

const translateModuleConfig: TranslateModuleConfig = {
loader: {
provide: TranslateLoader,
useFactory: HttpLoaderFactory,
useFactory: httpLoaderFactory,
deps: [HttpClient],
},
};
Expand Down Expand Up @@ -98,7 +98,7 @@ export class AppModule {
private _sanitizer: DomSanitizer = inject(DomSanitizer);

constructor() {
this._registerIcons(zanoIcons);
this._registerIcons(svgIcons);
}

private _registerIcons(arr: Array<string>): void {
Expand Down
6 changes: 3 additions & 3 deletions html_source/src/app/layouts/sidebar/sidebar.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { SidebarComponent } from './sidebar.component';
import { DragDropModule } from '@angular/cdk/drag-drop';
import { TranslateModule } from '@ngx-translate/core';
import { RouterModule } from '@angular/router';
import { DisablePriceFetchModule, TooltipModule } from '@parts/directives';
import { DisablePriceFetchDirective, TooltipDirective } from '@parts/directives';
import { ConfirmModalModule } from '@parts/modals/confirm-modal/confirm-modal.module';
import { DeeplinkModule } from '../../pages/deeplink/deeplink.module';
import { FlexLayoutModule } from '@angular/flex-layout';
Expand All @@ -23,9 +23,9 @@ import { MatTooltipModule } from '@angular/material/tooltip';
CommonModule,
RouterModule,
DragDropModule,
TooltipModule,
TooltipDirective,
TranslateModule,
DisablePriceFetchModule,
DisablePriceFetchDirective,
ConfirmModalModule,
SynchronizationStatusComponent,
DeeplinkModule,
Expand Down
4 changes: 2 additions & 2 deletions html_source/src/app/pages/auth/login/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ export class LoginComponent implements OnInit, OnDestroy {
buttons: {
submit: {
text: 'LOGIN.DIALOGS.CONFIRMATION.RESET.SUBMIT_BUTTON',
}
}
},
},
},
};
this.matDialog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[clearable]="false"
[items]="walletsToPay"
[searchable]="false"
autofocus
autofocus="true"
appAutofocus
appendTo="body"
bindLabel="name"
Expand Down Expand Up @@ -107,15 +107,6 @@ <h4 class="mb-2" fxFlex="0 0 auto">Creating a marketplace offer</h4>

<hr class="separator" />

<!--<div class="row">-->
<!-- <div class="label max-w-19-rem w-100">-->
<!-- {{ 'Mixins' | translate }}-->
<!-- </div>-->
<!-- <div class="text">{{ actionData.mixins || defaultMixin }}</div>-->
<!--</div>-->

<!--<hr class="separator" />-->

<div class="row">
<div class="title max-w-19-rem w-100">
{{ 'DEEPLINK.LABELS.LABEL9' | translate }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Component, HostBinding, NgZone, OnDestroy, OnInit, Renderer2 } from '@a
import { VariablesService } from '@parts/services/variables.service';
import { Deeplink, PushOffer, Wallet } from '@api/models/wallet.model';
import { BigNumber } from 'bignumber.js';
import { MIXIN } from '@parts/data/constants';
import { Subject } from 'rxjs';
import { Router } from '@angular/router';
import { BackendService } from '@api/services/backend.service';
Expand Down Expand Up @@ -30,8 +29,6 @@ export class DeeplinkModalComponent implements OnInit, OnDestroy {

actionData: Deeplink = {};

defaultMixin = MIXIN;

walletsToPay: Array<Wallet> = [];

private destroy$ = new Subject<void>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class OpenWalletComponent implements OnInit, OnDestroy {

this.openWalletForm.controls.filePath.patchValue(params.path);

let filename = '';
let filename: string;
if (params.path.lastIndexOf('.') === -1) {
filename = params.path.substr(params.path.lastIndexOf('/') + 1);
} else {
Expand Down
12 changes: 5 additions & 7 deletions html_source/src/app/pages/pages.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ import { SeedPhraseComponent } from './seed-phrase/seed-phrase.component';
import { AssignAliasComponent } from './assign-alias/assign-alias.component';
import { EditAliasComponent } from './edit-alias/edit-alias.component';
import { FlexLayoutModule } from '@angular/flex-layout';
import { DefaultImgModule, DisablePriceFetchModule } from '@parts/directives';
import { TooltipModule } from '@parts/directives/tooltip/tooltip.module';
import { DefaultImgModule, DisablePriceFetchDirective, TooltipDirective } from '@parts/directives';
import { ConfirmModalModule } from '@parts/modals/confirm-modal/confirm-modal.module';
import { DeeplinkModule } from './deeplink/deeplink.module';
import { FullLayoutModule } from '../layouts/full-layout/full-layout.module';
Expand All @@ -28,8 +27,7 @@ import {
ContractStatusMessagesPipeModule,
ContractTimeLeftPipeModule,
HistoryTypeMessagesPipeModule,
IntToMoneyPipeModule,
IsAvailableAliasNamePipeModule,
IntToMoneyPipeModule, IsAvailableAliasNamePipe,
MoneyToIntPipeModule,
SafeHtmlPipeModule,
ShortStringPipe,
Expand Down Expand Up @@ -74,8 +72,8 @@ import { MatTooltipModule } from '@angular/material/tooltip';
NgSelectModule,
TranslateModule.forChild(),
FlexLayoutModule,
DisablePriceFetchModule,
TooltipModule,
DisablePriceFetchDirective,
TooltipDirective,
ConfirmModalModule,
DeeplinkModule,
FullLayoutModule,
Expand All @@ -86,7 +84,7 @@ import { MatTooltipModule } from '@angular/material/tooltip';
ContractTimeLeftPipeModule,
HistoryTypeMessagesPipeModule,
IntToMoneyPipeModule,
IsAvailableAliasNamePipeModule,
IsAvailableAliasNamePipe,
MoneyToIntPipeModule,
SafeHtmlPipeModule,
ShortStringPipe,
Expand Down
3 changes: 0 additions & 3 deletions html_source/src/app/pages/paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,3 @@ export enum pathsChildrenWallet {
staking = 'staking',
}

export enum pathsChildrenContracts {
purchase = 'purchase',
}
Loading