From 2bac9d312ace9481edb54315cb0325ea7262b482 Mon Sep 17 00:00:00 2001 From: Roland Bewick Date: Sat, 6 Jan 2024 18:06:07 +0700 Subject: [PATCH] feat: add safari workaround for importing wallet --- src/pages/Home.tsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 0dbdcc9..d8fc797 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -74,8 +74,23 @@ export function Home() { } }} /> + ); } + +// Needed on iOS because PWA localStorage is not shared with Safari. +// PWA can only be installed with a static URL (e.g. "/pos/"). +function importWallet() { + const url = prompt("Copy wallet URL from your browser"); + if (url) { + window.location.href = url; + } +}