aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-12-30 16:41:12 -0800
committerAdam Soltys <[email protected]>2024-12-30 16:41:12 -0800
commitb83b9bf7cd49548c2cd2a15184254816ea8b4003 (patch)
tree696c3323b3b41c330cda152ce0f771ca6819762c /src/routes
parent0349e91841edbd17117e46ae6cf5b342ac3ebe96 (diff)
downloadcoinos-ui-b83b9bf7cd49548c2cd2a15184254816ea8b4003.tar.gz
coinos-ui-b83b9bf7cd49548c2cd2a15184254816ea8b4003.zip
fix setmax for take funds
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/(app)/fund/[id]/withdraw/+page.svelte9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/routes/(app)/fund/[id]/withdraw/+page.svelte b/src/routes/(app)/fund/[id]/withdraw/+page.svelte
index f6f12b1a..78f9b16c 100644
--- a/src/routes/(app)/fund/[id]/withdraw/+page.svelte
+++ b/src/routes/(app)/fund/[id]/withdraw/+page.svelte
@@ -1,4 +1,5 @@
<script>
+ import { tick } from "svelte";
import handler from "$lib/handler";
import { t } from "$lib/translations";
import { enhance } from "$app/forms";
@@ -6,7 +7,7 @@
import Spinner from "$comp/Spinner.svelte";
import { page } from "$app/stores";
import { s } from "$lib/utils";
- import { pin } from "$lib/store";
+ import { fiat, pin } from "$lib/store";
let { data, form } = $props();
@@ -14,7 +15,6 @@
let loading = $state();
let { id, balance, rate } = $derived(data);
let { amount } = $state(data);
- let fiat = $state();
let submit = $state();
let submitting = $state();
@@ -24,9 +24,10 @@
loading = false;
});
- let setMax = (e) => {
+ let setMax = async (e) => {
e.preventDefault();
- fiat = false;
+ $fiat = false;
+ await tick();
amount = balance;
};
</script>