Skip to content

Commit

Permalink
feat: add safari workaround for importing wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
rolznz committed Jan 6, 2024
1 parent a8838a5 commit 2bac9d3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,23 @@ export function Home() {
}
}}
/>
<button
className="btn btn-outline mt-8 btn-sm btn-secondary"
onClick={importWallet}
>
Import wallet URL
</button>
</div>
</div>
</>
);
}

// 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;
}
}

0 comments on commit 2bac9d3

Please sign in to comment.