Skip to content
Open
Show file tree
Hide file tree
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: 5 additions & 5 deletions packages/keychain/src/utils/connection/execute.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ describe("execute utils", () => {
// Should navigate to UI for session refresh
expect(mockNavigate).toHaveBeenCalledWith(
expect.stringMatching(/^\/execute\?/),
{ replace: true },
{ replace: true, reset: true },
);

// Parse the URL to verify error is included
Expand Down Expand Up @@ -292,7 +292,7 @@ describe("execute utils", () => {
// Should navigate to UI for manual execution
expect(mockNavigate).toHaveBeenCalledWith(
expect.stringMatching(/^\/execute\?/),
{ replace: true },
{ replace: true, reset: true },
);

// Parse the URL to verify error is included
Expand Down Expand Up @@ -378,7 +378,7 @@ describe("execute utils", () => {

expect(mockNavigate).toHaveBeenCalledWith(
expect.stringMatching(/^\/execute\?/),
{ replace: true },
{ replace: true, reset: true },
);

// The promise should be pending since sync mode waits for navigation
Expand Down Expand Up @@ -434,7 +434,7 @@ describe("execute utils", () => {

expect(mockNavigate).toHaveBeenCalledWith(
expect.stringMatching(/^\/execute\?/),
{ replace: true },
{ replace: true, reset: true },
);

expect(result).toEqual({
Expand Down Expand Up @@ -466,7 +466,7 @@ describe("execute utils", () => {

expect(mockNavigate).toHaveBeenCalledWith(
expect.stringMatching(/^\/execute\?/),
{ replace: true },
{ replace: true, reset: true },
);

// When trySessionExecute fails, we return USER_INTERACTION_REQUIRED
Expand Down
6 changes: 3 additions & 3 deletions packages/keychain/src/utils/connection/execute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export function execute({
}: {
navigate: (
to: string | number,
options?: { replace?: boolean; state?: unknown },
options?: { replace?: boolean; state?: unknown; reset?: boolean },
) => void;
propagateError?: boolean;
errorDisplayMode?: "modal" | "notification" | "silent"; // Available for potential future use
Expand All @@ -134,7 +134,7 @@ export function execute({
reject,
});

navigate(url, { replace: true });
navigate(url, { replace: true, reset: true });
});
}

Expand Down Expand Up @@ -184,7 +184,7 @@ export function execute({
resolve,
reject,
});
navigate(url, { replace: true });
navigate(url, { replace: true, reset: true });

return resolve({
code: ResponseCodes.USER_INTERACTION_REQUIRED,
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/src/utils/connection/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function connectToController<ParentMethods extends object>({
setController: (controller?: Controller) => void;
navigate: (
to: string | number,
options?: { replace?: boolean; state?: unknown },
options?: { replace?: boolean; state?: unknown; reset?: boolean },
) => void;
propagateError?: boolean;
errorDisplayMode?: "modal" | "notification" | "silent";
Expand Down
Loading