We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70794e4 commit 9346f7bCopy full SHA for 9346f7b
src/components/Swap/TokenAmount.svelte
@@ -28,10 +28,13 @@
28
let insufficientBalance = false
29
let tokenBalanceResult: FetchBalanceResult | undefined
30
31
+ // Computes the value displayed in the input
32
$: value = amount && token ? formatUnits(amount, token.decimals) : ''
33
34
+ // Empties the token balance if unselecting the token
35
$: if (!token) tokenBalanceResult = undefined
36
37
+ // Formats the readable version of the balance
38
$: balance = tokenBalanceResult
39
? `${truncateString(tokenBalanceResult.formatted, 8)} ${tokenBalanceResult.symbol}`
40
: ''
0 commit comments