Skip to content

Commit

Permalink
refactor powerup
Browse files Browse the repository at this point in the history
  • Loading branch information
ttwishing committed Oct 2, 2024
1 parent 73520ad commit 5c9bbea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/pages/resources/components/forms/powerup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import {activeBlockchain, activeSession, currentAccount} from '~/store'
import {systemToken} from '~/stores/tokens'
import {systemTokenBalance} from '~/stores/balances'
import {cpuPowerupPrice, netPowerupPrice, sampleUsage, statePowerUp} from '~/pages/resources/resources'
import {cpuPowerupPrice as powerupPrice, sampleUsage, statePowerUp} from '~/pages/resources/resources'
import type {FormTransaction} from '~/ui-types'
import Button from '~/components/elements/button.svelte'
Expand All @@ -23,7 +23,7 @@
export let resource: string = 'cpu'
const unit = resource === 'cpu' ? 'ms' : 'kb'
const powerupPrice = resource === 'cpu' ? cpuPowerupPrice : netPowerupPrice
// const powerupPrice = resource === 'cpu' ? cpuPowerupPrice : netPowerupPrice
let amount: Writable<string> = writable('')
let error: string | undefined
Expand Down
6 changes: 3 additions & 3 deletions src/pages/resources/components/state/prices.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
import {ChainFeatures} from '~/config'
import {activeBlockchain} from '~/store'
import {cpuPowerupPrice, netPowerupPrice, rexPrice, cpuStakingPrice, netStakingPrice} from '~/pages/resources/resources'
import {cpuPowerupPrice as powerupPrice, rexPrice, cpuStakingPrice as stakingPrice} from '~/pages/resources/resources'
import Button from '~/components/elements/button.svelte'
import Segment from '~/components/elements/segment.svelte'
import SegmentGroup from '~/components/elements/segment/group.svelte'
export let resource = 'cpu'
const unit = resource === 'cpu' ? 'ms' : 'kb'
const powerupPrice = resource === 'cpu' ? cpuPowerupPrice : netPowerupPrice
const stakingPrice = resource === 'cpu' ? cpuStakingPrice : netStakingPrice
// const powerupPrice = resource === 'cpu' ? cpuPowerupPrice : netPowerupPrice
// const stakingPrice = resource === 'cpu' ? cpuStakingPrice : netStakingPrice
const {PowerUp, REX, Staking} = ChainFeatures
Expand Down

0 comments on commit 5c9bbea

Please sign in to comment.