Skip to content

Commit

Permalink
code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ttwishing committed Oct 15, 2024
1 parent b43d3bf commit 9b9895f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import Stack from '$lib/components/layout/stack.svelte';
import Transaction from '$lib/components/transaction.svelte';
import { Checksum256, Asset } from '@wharfkit/antelope';
import { Checksum256 } from '@wharfkit/antelope';
import type { TransactResult } from '@wharfkit/session';
import { RentState } from './state.svelte';
Expand Down Expand Up @@ -128,9 +128,9 @@
</p>
{/if}
{#if rentState.pricePerUnit}
<p>
Price:{rentState.pricePerUnit}
</p>
<p>
Price:{rentState.pricePerUnit}
</p>
{/if}

{#if rentState.error}
Expand Down
6 changes: 2 additions & 4 deletions src/routes/[network]/(account)/resources/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { PowerUpState } from '@wharfkit/resources';
import type { REXState } from '@wharfkit/resources';
import { Asset } from '@wharfkit/antelope';
import { SampledUsage } from '$lib/types';
import { UInt128 } from '@wharfkit/antelope';
import BN from 'bn.js';

export const calSize = (available: number) => {
let size = 0;
Expand Down Expand Up @@ -75,11 +73,11 @@ export const getRexPrice = (
switch (resourceType) {
case ResourceType.NET:
const netPrice = rexState.net_price_per_kb(sampledUsage, 30);
console.log("netPrice = ", netPrice);
console.log('netPrice = ', netPrice);
return compatPriceWithPrecision(netPrice, systemTokenSymbol);
case ResourceType.CPU:
const cpuPrice = rexState.cpu_price_per_ms(sampledUsage, 30);
console.log("cpuPrice = ", cpuPrice);
console.log('cpuPrice = ', cpuPrice);
return compatPriceWithPrecision(cpuPrice, systemTokenSymbol);
default:
throw new Error(`unsupport resource type: ${resourceType}`);
Expand Down

0 comments on commit 9b9895f

Please sign in to comment.