Fock-Goncharov coordinates and rank $n$ swapping algebra