Skip to content

Commit 9346f7b

Browse files
committed
Added docs
1 parent 70794e4 commit 9346f7b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/components/Swap/TokenAmount.svelte

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@
2828
let insufficientBalance = false
2929
let tokenBalanceResult: FetchBalanceResult | undefined
3030
31+
// Computes the value displayed in the input
3132
$: value = amount && token ? formatUnits(amount, token.decimals) : ''
3233
34+
// Empties the token balance if unselecting the token
3335
$: if (!token) tokenBalanceResult = undefined
3436
37+
// Formats the readable version of the balance
3538
$: balance = tokenBalanceResult
3639
? `${truncateString(tokenBalanceResult.formatted, 8)} ${tokenBalanceResult.symbol}`
3740
: ''

0 commit comments

Comments
 (0)