diff --git a/packages/keychain/src/components/transaction/ConfirmTransaction.test.tsx b/packages/keychain/src/components/transaction/ConfirmTransaction.test.tsx index 4631a174a2..ca9a50870c 100644 --- a/packages/keychain/src/components/transaction/ConfirmTransaction.test.tsx +++ b/packages/keychain/src/components/transaction/ConfirmTransaction.test.tsx @@ -159,6 +159,11 @@ describe("ConfirmTransaction", () => { await waitFor(() => { expect(screen.getAllByText("Account validation failed")).toHaveLength(2); }); + + // Submit errors must be propagated so caller promises can resolve/reject + await waitFor(() => { + expect(defaultProps.onError).toHaveBeenCalledWith(validationError); + }); }); it("skips session UI when skipSession is used", async () => { diff --git a/packages/keychain/src/components/transaction/ConfirmTransaction.tsx b/packages/keychain/src/components/transaction/ConfirmTransaction.tsx index aa5d91b93e..7d31c1bb70 100644 --- a/packages/keychain/src/components/transaction/ConfirmTransaction.tsx +++ b/packages/keychain/src/components/transaction/ConfirmTransaction.tsx @@ -81,6 +81,7 @@ export function ConfirmTransaction({ const submitError = e as ControllerError; console.error("Transaction execution failed:", submitError); setError(submitError); + onError?.(submitError); toast.error("", { message: "Transaction execution failed", toastId,