aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-03-08 23:05:32 -0700
committerAdam Soltys <[email protected]>2026-03-08 23:05:32 -0700
commit511b90510a5821073ce3b9f499186a3b3d7bc589 (patch)
tree37b79b9ea9926c9d32964b04bd3c3be62cdc5c4f
parentec3c69de3fc135d0d8cc457d650f85621a7a601b (diff)
downloadcoinos-ui-511b90510a5821073ce3b9f499186a3b3d7bc589.tar.gz
coinos-ui-511b90510a5821073ce3b9f499186a3b3d7bc589.zip
register Hce capacitor plugin on JS side
-rw-r--r--src/routes/(app)/fund/[id]/+page.svelte4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/routes/(app)/fund/[id]/+page.svelte b/src/routes/(app)/fund/[id]/+page.svelte
index 254e6d31..14586701 100644
--- a/src/routes/(app)/fund/[id]/+page.svelte
+++ b/src/routes/(app)/fund/[id]/+page.svelte
@@ -15,6 +15,9 @@
import { t } from "$lib/translations";
import { copy, sats, loc, post } from "$lib/utils";
import { loginRedirect } from "$lib/store";
+ import { registerPlugin } from "@capacitor/core";
+
+ const Hce = (window as any).Capacitor ? registerPlugin("Hce") : null;
let { data }: any = $props();
@@ -33,7 +36,6 @@
let amountFiat = $derived(parseFloat(((amount * rate) / sats).toFixed(2)));
let hceActive = $state(false);
- const Hce = (window as any).Capacitor?.Plugins?.Hce;
$effect(() => {
$loginRedirect = $page.url.pathname;