Hello everyone. When I press the send transaction button while on the Phantom devnet network, I can send it to Solana. I get this error when I switch to mainnet and try to send transaction. Is it because I'm in localhost? In the application, I did not write the code for the select any network part. How can I switch to the mainnet?
2 Answers
without the code its a bit hard to tell, but if you use wallet adapter it maybe smth like this:
<ConnectionProvider endpoint={endpoint}>
Where the endpoint is the cluster url.
Could also be that you create a connection manually somewhere, then you would need to search for connection:
export const connection = new Connection(clusterApiUrl("devnet"), {
commitment: "confirmed",
})
Hope this gives you a hint what to search for in your project. Here is an example game in case you need a reference: https://github.com/solana-developers/solana-game-starter-kits/tree/main/tiny-adventure
In phantom wallet find settings then find developer setting, and you can change network in phantom wallet. The network in phantom wallet and The network in should be the same
-
yes i know that but i want to transfer on mainnet. I can't figure out what I need to change to mainnet in my application. Commented May 29, 2023 at 9:46