File tree Expand file tree Collapse file tree 1 file changed +17
-7
lines changed
app2/src/lib/components/Transfer Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,14 @@ import { transfer } from "$lib/components/Transfer/transfer.svelte.ts"
44import { Option } from " effect"
55import { formatUnits } from " viem"
66import Skeleton from " $lib/components/ui/Skeleton.svelte"
7+ import { wallets } from " $lib/stores/wallets.svelte.ts"
8+
9+ let chainWallet = $derived .by (() => {
10+ if (Option .isSome (transfer .sourceChain )) {
11+ return wallets .getAddressForChain (transfer .sourceChain .value )
12+ }
13+ return Option .none ()
14+ })
715
816function allDataReadyForBalance() {
917 return (
@@ -93,13 +101,15 @@ function setMaxAmount() {
93101
94102<div class =" flex w-full justify-between text-xs" >
95103 <p >
96- BALANCE:
97- {#if ! transfer .raw .source || ! transfer .raw .asset }
98- 0
99- {:else if ! allDataReadyForBalance ()}
100- <Skeleton class =" h-3 w-16 inline-block" />
101- {:else }
102- {displayBalance }
104+ {#if Option .isSome (chainWallet )}
105+ BALANCE:
106+ {#if ! transfer .raw .source || ! transfer .raw .asset }
107+ 0
108+ {:else if ! allDataReadyForBalance ()}
109+ <Skeleton class =" h-3 w-16 inline-block" />
110+ {:else }
111+ {displayBalance }
112+ {/if }
103113 {/if }
104114 </p >
105115 <button
You can’t perform that action at this time.
0 commit comments