I think much of the core value of gold pressed Latinum as Ferengi currency stemmed from the fact that it could not be replicated (or likely transported). Thus allowing Feregi society and economic health to be based on a Latinum standard. Weirdly and almost counter intuitively in Star Trek this is probably the only bit of future economics that is not complete and utter hogwash, actually makes sense, and would hold up to scrutiny.
Yeah let that sink in. Likely the only species or civilization depicted in Star Trek, that could in fact likely really function... Is the Ferengi.
So what if the gold pressed latinum is also used as the material of Photon or Quantum Torpedoes core? What if it used as the computer circuit? What if it used for something? Even the gold and diamond are used as the material of something in real world.
Plus, starships need dilithium, and replicator can't make it. If not, why Voyager needs to visit a planet and restock? Why the limited number of photon torpedoes aboard is problematic for them? If replicator can build everything, They won't have any worry about the limited number of Photon Torpedoes.
so the most logical answer is that trading is still happen in 24th century Star Trek. Federation still do trade. Maybe Earth Government still conduct trade with Vulcan, Klingon, Bajor, etc. But the people on Earth can get their daily necessity free, because of the government subsidies.