diff --git a/src/pages/resources/resources.ts b/src/pages/resources/resources.ts index 2cc8d7cd..c189f922 100644 --- a/src/pages/resources/resources.ts +++ b/src/pages/resources/resources.ts @@ -1,14 +1,14 @@ -import {derived, Readable} from 'svelte/store' -import {API, Asset} from '@greymass/eosio' -import {Resources, SampleUsage, PowerUpState, RAMState, REXState} from '@greymass/eosio-resources' -import {activeBlockchain} from '~/store' +import { derived, Readable } from 'svelte/store' +import { API, Asset } from '@greymass/eosio' +import { Resources, SampleUsage, PowerUpState, RAMState, REXState } from '@greymass/eosio-resources' +import { activeBlockchain } from '~/store' -import {getClient} from '../../api-client' -import {ChainConfig, ChainFeatures, resourceFeatures} from '~/config' +import { getClient } from '../../api-client' +import { ChainConfig, ChainFeatures, resourceFeatures } from '~/config' const getResourceClient = (chain: ChainConfig) => { const api = getClient(chain) - const options: any = {api} + const options: any = { api } if (chain.resourceSampleAccount) { options.sampleAccount = chain.resourceSampleAccount } @@ -127,7 +127,7 @@ export const cpuStakingPrice = derived( [activeBlockchain, msToRent, sampleUsage], ([$activeBlockchain, $msToRent, $sampleUsage]) => { if ($msToRent && $sampleUsage) { - const {account} = $sampleUsage + const { account } = $sampleUsage const cpu_weight = Number(account.total_resources.cpu_weight.units) const cpu_limit = Number(account.cpu_limit.max.value) let price = cpu_weight / cpu_limit @@ -145,7 +145,7 @@ export const netStakingPrice = derived( [activeBlockchain, msToRent, sampleUsage], ([$activeBlockchain, $msToRent, $sampleUsage]) => { if ($msToRent && $sampleUsage) { - const {account} = $sampleUsage + const { account } = $sampleUsage const net_weight = Number(account.total_resources.net_weight.units) const net_limit = Number(account.net_limit.max.value) let price = net_weight / net_limit