Skip to content

Commit

Permalink
Merge pull request #106 from NazarUsov/testnet/issues
Browse files Browse the repository at this point in the history
Bug fixes
  • Loading branch information
cryptozoidberg authored Mar 19, 2024
2 parents e4a76ad + 20199de commit 534f849
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ import { zanoAssetInfo } from '@parts/data/assets';
<ng-container *ngIf="subtransfer.amount.toNumber() !== 0">
<div class="text-ellipsis">
<span *ngIf="!subtransfer.is_income">
{{ subtransfer.amount | intToMoney }}
{{ subtransfer.amount.negated() | intToMoney }}
</span>
<span *ngIf="subtransfer.is_income">
{{ subtransfer.amount | intToMoney }}
Expand Down Expand Up @@ -494,7 +494,7 @@ export class HistoryComponent implements OnInit, OnDestroy {

isVisibleFee(transaction: Transaction): boolean {
const { subtransfers } = transaction;
return !subtransfers?.find(({ asset_id }) => asset_id === zanoAssetInfo.asset_id)?.is_income;
return subtransfers ? !subtransfers?.every(({ is_income }) => is_income) : false;
}

strokeSize(item): number {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ import { defaultImgSrc, zanoAssetInfo } from '@parts/data/assets';
appDefaultImg
/>
{{ asset.asset_info.full_name || '---' }}
({{ asset.total | intToMoney }} {{ asset.asset_info.ticker }})
</ng-template>
</ng-select>
<div
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
:host {
width: 100%;
height: 100%;
display: flex;
flex-direction: row;
}
Expand Down
16 changes: 8 additions & 8 deletions html_source/src/app/pages/wallet/wallet/wallet.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,9 @@ const objTabs: { [key in TabNameKeys]: Tab } = {
</ng-container>
</div>
<div class="tabs-content">
<router-outlet *ngIf="!loader"></router-outlet>
<div style="flex: 1;" [ngStyle]="{ display: loader ? 'none' : 'flex' }">
<router-outlet></router-outlet>
</div>
<div class="preloader" *ngIf="loader">
<p class="mb-2">
{{ 'Loading...' | translate }}
Expand Down Expand Up @@ -365,7 +367,7 @@ export class WalletComponent implements OnInit, OnDestroy {
next: (wallet: Wallet) => {
this.createTabs(wallet);
const disabled = !wallet.loaded;
this.setDisabledTabs(['send', 'staking'], disabled);
this.setDisabledTabs(['send', 'swap', 'staking'], disabled);

this.variablesService.is_hardfok_active$.pipe(
take(1)
Expand Down Expand Up @@ -394,9 +396,7 @@ export class WalletComponent implements OnInit, OnDestroy {

navigationInterceptor(event: RouterEvent): void {
if (event instanceof NavigationStart) {

this.loader = true;

}
if (event instanceof NavigationEnd) {
setTimeout(() => {
Expand All @@ -405,12 +405,12 @@ export class WalletComponent implements OnInit, OnDestroy {
}
if (event instanceof NavigationCancel) {
setTimeout(() => {
this.loader = true;
this.loader = false;
}, 500);
}
if (event instanceof NavigationError) {
setTimeout(() => {
this.loader = true;
this.loader = false;
}, 500);
}

Expand Down Expand Up @@ -581,10 +581,10 @@ export class WalletComponent implements OnInit, OnDestroy {

if (wallet_state === 2) {
this.walletLoaded = true;
this.setDisabledTabs(['send', 'staking'], false);
this.setDisabledTabs(['send', 'swap', 'staking'], false);
} else {
this.walletLoaded = false;
this.setDisabledTabs(['send', 'staking'], true);
this.setDisabledTabs(['send', 'swap', 'staking'], true);
}
});
});
Expand Down

0 comments on commit 534f849

Please sign in to comment.