Skip to content

Commit

Permalink
fix: use push instead of replace after dismissing
Browse files Browse the repository at this point in the history
  • Loading branch information
im-adithya committed Feb 28, 2025
1 parent 1f25e39 commit 3c19e9d
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions lib/link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,13 @@ export const handleLink = async (url: string) => {
if (SUPPORTED_SCHEMES.indexOf(parsedUrl.protocol) > -1) {
let { username, hostname, protocol, pathname, search } = parsedUrl;
if (parsedUrl.protocol.startsWith("nostr+walletauth")) {
if (router.canGoBack()) {
try {
router.back();
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (error) {
// ignore
}
}
if (router.canDismiss()) {
try {
router.dismissAll();
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (error) {
// ignore
}
router.dismissAll();
}

const nwaOptions = nwa.NWAClient.parseWalletAuthUrl(url);

router.replace({
router.push({
pathname: "/settings/wallets/connect",
params: {
options: JSON.stringify(nwaOptions),
Expand Down

0 comments on commit 3c19e9d

Please sign in to comment.