Skip to content

Commit

Permalink
Merge pull request #118 from NazarUsov/testnet/issues
Browse files Browse the repository at this point in the history
How fix view asset info
  • Loading branch information
sowle authored Jun 22, 2024
2 parents 9be6a53 + 04729b9 commit b489a82
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion html_source/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"build --watch": "ng build --output-path \"D:/work/nazar/Zano/html\" --watch",
"build --watch": "ng build --output-path \"/Applications/Zano.app/Contents/MacOS/html\" --watch",
"build --html": "node update-build-time.js && ng build --output-path \"../html/\"",
"test": "ng test",
"lint": "ng lint",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ import { ParamsCallRpc } from '@api/models/call_rpc.model';
</div>
<div class="text">
{{
asset.asset_info.asset_id === zanoAssetInfo.asset_id
(asset.asset_info.asset_id === zanoAssetInfo.asset_id
? zano_current_supply
: asset.asset_info.current_supply
: asset.asset_info.current_supply) | intToMoney: asset.asset_info.decimal_point
}}
</div>
</div>
Expand All @@ -69,7 +69,7 @@ import { ParamsCallRpc } from '@api/models/call_rpc.model';
{{
asset.asset_info.asset_id === zanoAssetInfo.asset_id
? 'Uncapped'
: asset.asset_info.total_max_supply
: (asset.asset_info.total_max_supply | intToMoney: asset.asset_info.decimal_point)
}}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ import { CommonModule } from '@angular/common';
import { AssetDetailsComponent } from '@parts/modals/asset-details/asset-details.component';
import { TranslateModule } from '@ngx-translate/core';
import { FlexModule } from '@angular/flex-layout';
import { IntToMoneyPipeModule } from '@parts/pipes';

@NgModule({
declarations: [AssetDetailsComponent],
exports: [AssetDetailsComponent],
imports: [CommonModule, TranslateModule, FlexModule],
imports: [CommonModule, TranslateModule, FlexModule, IntToMoneyPipeModule],
})
export class AssetDetailsModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class IntToMoneyPipe implements PipeTransform {
if (args) {
maxFraction = parseInt(args, 10);
}
const power = Math.pow(10, this.variablesService.digits);
const power = Math.pow(10, maxFraction);
let str = new BigNumber(value).div(power).toFixed(maxFraction);

for (let i = str.length - 1; i >= 0; i--) {
Expand Down

0 comments on commit b489a82

Please sign in to comment.