Skip to content

Commit

Permalink
Linting and corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroncox committed Aug 13, 2023
1 parent 9a671f9 commit dc80758
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 24 deletions.
3 changes: 2 additions & 1 deletion src/components/elements/banxa/button.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import {writable} from 'svelte/store'
import Button from '~/components/elements/button.svelte'
import {generateWidget} from '~/lib/banxa'
import {activeSession, activeBlockchain} from '~/store'
import {activeSession} from '~/store'
import Modal from '~/components/elements/modal.svelte'
Expand Down Expand Up @@ -97,6 +97,7 @@
bind:display={displayModal}
>
<iframe
title="Banxa"
on:load={setupIframeListener}
id="banxa-widget"
src={tokenPurchaseUrl}
Expand Down
2 changes: 1 addition & 1 deletion src/components/elements/form/transaction.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
// Set the current value equal to the initial value
let currentValue: any = initialValue
// Start an interval to continously monitor for changes to that value
// Start an interval to continuously monitor for changes to that value
refreshInterval = setInterval(() => {
// Refresh the account
refreshAccount($currentAccount!.account_name)
Expand Down
5 changes: 2 additions & 3 deletions src/components/layout/account/sidebar.svelte
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<script>
import {SerializedSession} from '@wharfkit/session'
import {activate} from '~/auth'
import type {SessionLike} from '~/auth'
import Icon from '~/components/elements/icon.svelte'
import List from './list.svelte'
export let open = false
function onSelect(session: SessionLike) {
function onSelect(session: SerializedSession) {
activate(session)
open = false
}
Expand Down
14 changes: 7 additions & 7 deletions src/pages/dashboard/index.svelte
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<script>
import {Asset, Name} from '@wharfkit/antelope'
import {derived} from 'svelte/store'
import type {Readable} from 'svelte/store'
import {getClient} from '~/api-client'
import {Asset} from '@wharfkit/antelope'
import {derived} from 'svelte/store'
import {DelegatedBandwidth} from '~/abi-types'
import {ChainFeatures} from '~/config'
import {activeSession, activeBlockchain, currentAccount, activePriceTicker} from '~/store'
import {balances, fetchBalances} from '~/stores/balances'
import {isLoading} from '~/stores/balances-provider'
import {getToken, systemTokenKey, tokens} from '~/stores/tokens'
import {getToken, systemTokenKey} from '~/stores/tokens'
import {stateREX} from '~/pages/resources/resources'
import Page from '~/components/layout/page.svelte'
Expand Down Expand Up @@ -81,8 +81,8 @@
)
const totalUsdValue: Readable<number> = derived(
[balances, currentAccount, delegatedTokens, tokens, activePriceTicker, rexTokens],
([$balances, $currentAccount, $delegated, $tokens, $price, $rex]) => {
[balances, currentAccount, delegatedTokens, activePriceTicker, rexTokens],
([$balances, $currentAccount, $delegated, $price, $rex]) => {
let value = 0
if ($currentAccount && $price !== undefined) {
value += $rex * $price
Expand Down
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 @@ -90,9 +90,9 @@
],
})
// If the context exists and this is part of a FormTransaction
if (context) {
if (context && result.resolved) {
// Pass the transaction ID to the parent
const txid = String(result.transaction.id)
const txid = String(result.resolved.transaction.id)
context.setTransaction(txid)
// Await an update on the field expected for this transaction
Expand Down
4 changes: 2 additions & 2 deletions src/pages/resources/components/forms/rambuy.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@
})
// If the context exists and this is part of a FormTransaction
if (context) {
if (context && result.resolved) {
// Pass the transaction ID to the parent
const txid = String(result.transaction.id)
const txid = String(result.resolved.transaction.id)
context.setTransaction(txid)
// Await an update on the field expected for this transaction
Expand Down
4 changes: 2 additions & 2 deletions src/pages/resources/components/forms/ramsell.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@
})
// If the context exists and this is part of a FormTransaction
if (context) {
if (context && result.resolved) {
// Pass the transaction ID to the parent
const txid = String(result.transaction.id)
const txid = String(result.resolved.transaction.id)
context.setTransaction(txid)
// Await an update on the field expected for this transaction
Expand Down
4 changes: 2 additions & 2 deletions src/pages/resources/components/forms/rex.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@
actions,
})
// If the context exists and this is part of a FormTransaction
if (context) {
if (context && result.resolved) {
// Pass the transaction ID to the parent
const txid = String(result.transaction.id)
const txid = String(result.resolved.transaction.id)
context.setTransaction(txid)
// Await an update on the field expected for this transaction
Expand Down
4 changes: 2 additions & 2 deletions src/pages/resources/components/forms/staking.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@
})
// If the context exists and this is part of a FormTransaction
if (context) {
if (context && result.resolved) {
// Pass the transaction ID to the parent
const txid = String(result.transaction.id)
const txid = String(result.resolved.transaction.id)
context.setTransaction(txid)
// Await an update on the field expected for this transaction
Expand Down
4 changes: 2 additions & 2 deletions src/pages/transfer/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
const balance: Readable<Balance | undefined> = derived(
[activeSession, balances, token],
([$activeSession, $currentBalances, $token]) => {
if ($token) {
const key = makeBalanceKey($token, $activeSession?.actor)
if ($activeSession && $token) {
const key = makeBalanceKey($token, $activeSession.actor)
return $currentBalances.find((b) => b.key === key)
}
}
Expand Down

0 comments on commit dc80758

Please sign in to comment.