diff --git a/packages/keychain/src/components/ExecutionContainer.tsx b/packages/keychain/src/components/ExecutionContainer.tsx index fd7592acd..3d57c0cfd 100644 --- a/packages/keychain/src/components/ExecutionContainer.tsx +++ b/packages/keychain/src/components/ExecutionContainer.tsx @@ -98,6 +98,7 @@ export function ExecutionContainer({ setCtrlError(error); } finally { setIsLoading(false); + setMaxFee(null); } }; diff --git a/packages/keychain/src/hooks/connection.ts b/packages/keychain/src/hooks/connection.ts index 4bfcf0c78..8778286f9 100644 --- a/packages/keychain/src/hooks/connection.ts +++ b/packages/keychain/src/hooks/connection.ts @@ -67,11 +67,12 @@ export function useConnectionValue() { code: ResponseCodes.CANCELED, message: "User aborted", }); + setContext(undefined); // clears context await parent.close(); } catch (e) { // Always fails for some reason } - }, [context, parent]); + }, [context, parent, setContext]); const openModal = useCallback(async () => { if (!parent) return; diff --git a/packages/keychain/src/utils/connection/types.ts b/packages/keychain/src/utils/connection/types.ts index c5266df62..224b52149 100644 --- a/packages/keychain/src/utils/connection/types.ts +++ b/packages/keychain/src/utils/connection/types.ts @@ -21,7 +21,8 @@ export type ConnectionCtx = | LogoutCtx | ExecuteCtx | SignMessageCtx - | OpenSettingsCtx; + | OpenSettingsCtx + | undefined; export type ConnectCtx = { origin: string;