Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add unique id to app created page #257

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions frontend/src/screens/apps/NewApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,13 @@ const NewAppInternal = ({ capabilities }: NewAppInternalProps) => {
window.location.href = createAppResponse.returnTo;
return;
}
navigate(`/apps/created${app ? `?app=${app.id}` : ""}`, {
state: createAppResponse,
});
// Adding a unique id prevents https://github.com/getAlby/hub/issues/252
navigate(
`/apps/created?id=${createAppResponse.pairingPublicKey}${app ? `&app=${app.id}` : ""}`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was already here, but why is there a conditional here? this seems wrong?

Also, the pairingPublicKey should be unique per app

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, I completely misread this. I am wrong 😢

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but it's weird, the navigation state should work. And it seems like it's not

{
state: createAppResponse,
}
);
toast({ title: "App created" });
} catch (error) {
handleRequestError(toast, "Failed to create app", error);
Expand Down
Loading