Local ring of a generic point on an integral scheme is a field 
Let $X$ be an integral scheme and let $\eta \in X$ be its generic
point. Then the local ring $K(X) := \mathcal{O}_{X, \eta}$ is a field.
Moreover, if $U = \text{Spec} A$ is any open affine subset of $X$, then
$K(X) \cong \text{Frac} A$.

I would like to prove this proposition. I have already seen a proof that I understand, for example here. But I would like to see if my partial approach can somehow be extended to a full proof.

Since $X$ is integral, $A$ is an integral domain and $\text{Frac} A$ is well-defined and a field. So we only need to show the last part.
Let $U = \text{Spec} A$ be an affine open subset of $X$. Then since $\eta$ is the generic point, it is contained in all open subsets of $X$.
We have $A=\mathcal{O}_X(U)$ so $\text{Frac} A = \{ f/g \ | \ f, g \in \mathcal{O}_{X}(U), \ g\neq0 \}$. Define the map
\begin{align*}
   \phi: \text{Frac} A &\to K(X) = \mathcal{O}_{X, \eta}\\
   f/g & \mapsto (U \cap D(g), f/g).
  \end{align*}

*

*Consider $(U \cap D(g), g) \in \mathcal{O}_{X, \eta}$. Provided $(U \cap D(g), g) \notin m_{\eta}$, then this element has an inverse $(U \cap D(g), 1/g) \in \mathcal{O}_{X, \eta}$ and we can multiply it with $(U \cap D(g), f) \in \mathcal{O}_{X, \eta}$. This is how our map $\phi$ is defined.

So we now show that $(U \cap D(g), g) \notin m_\eta$. How do we show that?


*It is obvious that $\phi$ is a ring homomorphism.

Let $f/g \in \ker \phi$. Then $(U \cap D(g), f/g) =0 \in \mathcal{O}_{X, \eta}$ and so the product $(U \cap D(g), f)(U \cap D(g), 1/g) =0 \in \mathcal{O}_{X, \eta}$. Because $X$ is integral, $\mathcal{O}_{X, \eta}$ has no zero-divisors. Since $(U \cap D(g), 1/g)$ is a unit, it is not $0$, hence we must have $(U \cap D(g), f)=0$. So there is an open set $V \subset U \cap D(g)$ such that $f$ restricted to $V$ is $0$. So $f(\eta)=0$ and because $\eta$ is dense in $U$ and $\mathcal{O}_X(U)$ has no nilpotent elements we have $f=0$. So $\phi$ is injective.
How to prove surjectivity?
 A: If $(X,\mathcal{O}_X)$ is an integral scheme and $U \subseteq X$ is an open subscheme with $p\in U$ a point, it follows there is an isomorphism of local rings $\mathcal{O}_{X,p} \cong \mathcal{O}_{U,p}$. Here $\mathcal{O}_U$ is the restriction of the sheaf $\mathcal{O}_X$ to the open subscheme $U \subseteq X$.
Hence you may use the structure sheaf of any open subscheme $U$ containing $p$ to calculate the stalk at $p$. If $U=Spec(A)$ is an affine open subscheme containing $p$ it follows $\mathcal{O}_{X,p} \cong A_{\mathfrak{p}}$ where $\mathfrak{p}\subseteq A$ is the prime ideal in $A$ correspoding to the point $p$. Since $p$ is the generic point of $X$ it follows $\mathfrak{p}$ is the zero ideal in $A$. Hence there is an isomorphism $\mathcal{O}_{X,p} \cong A_{\mathfrak{p}} \cong K(A)$, where $K(A)$ is the quotient field of $A$ (since $X$ is integral it follows $A$ is an integral domain).
The map $\phi$ you write down above is the following "composed map":
Formula 1. $\phi: Frac(A) := A_{\mathfrak{p}} \cong \mathcal{O}_{U,p} := \lim_{\eta \in V}\mathcal{O}_U(V) \cong \lim_{\eta \in V}\mathcal{O}_X(V):=K(X)$
and all the maps in Formula 1 are canonical and isomorphisms. If you check the proof of this for all these maps you should get an answer to question 1 and 2  above.
Note: When I write $\mathcal{O}_{U,p}:=\lim_{p\in V}\mathcal{O}_U(V)$
using the sign $:=$ I means this is a definition. Hence here I define the local ring of the open scheme $U$ at the point $p$. The sign $\cong$ means "isomorphism".
The isomorphism $\mathcal{O}_{U,p} \cong A_{\mathfrak{p}}$ is in Hartshorne, Thm I.3.2. The definition $\mathcal{O}_{U,p} := \lim_{p\in V}\mathcal{O}_U(V)$ is explained in Chapter II.1 in Hartshorne. The isomorphism $\mathcal{O}_{X,p} \cong \mathcal{O}_{U,p}$ is an elementary result on limits, and you may find this in Atiyah-Macdonalds book on commutative algebra. To write this out in complete detail should be done on a blackboard in a classroom.
