swap-ui icon indicating copy to clipboard operation
swap-ui copied to clipboard

Transaction was not confirmed in 30.01 seconds: RPC delay breaking UX

Open secretshardul opened this issue 4 years ago • 3 comments

There's over a 30 second delay before swaps are acknowledged. A red error box shows up, which breaks user experience even though the transaction goes through. We're noticing this for few weeks now. This issue is not faced on Raydium. Tested with v0.2.2.

Screenshot 2021-08-17 at 2 26 09 PM

secretshardul avatar Aug 17 '21 09:08 secretshardul

This can probably be fixed in ones own app by subclassing Provider and listening for transaction confirmations manually. The other aspect is to use an app specific validator. This demo uses solana-api.projectserum.com which is public infrastructure shared across many apps so it's not going to be as reliable as using a private one.

armaniferrante avatar Aug 17 '21 23:08 armaniferrante

We noticed that https://api.mainnet-beta.solana.com RPC gives much lower latency.

secretshardul avatar Aug 22 '21 11:08 secretshardul

The swap UI makes a lot of RPC calls, which is probably causing this issue. We tried Figment's private RPC, which immediately timed us out. The price refresh rate needs to be reduced.

secretshardul avatar Aug 31 '21 15:08 secretshardul