0

When building an app, which factors play into whether or not a wallet will show expected token changes? Can those factors be controlled?

  • client wallet adapter versions?
  • program complexity?
  • number of accounts or size of accounts?
  • rpc endpoint?

For my app, sometimes the preview shows very quickly, sometimes it takes a while, and sometimes the wallet just throws a big question mark. Users don't want question marks...

2 Answers 2

0

in my case sometimes the wallet show a message like "i don't know what will happen if you sign" (of course that's not the right text, but you get the meaning), and if i wait a few secs, then it displays token changes.

I've never seen anything about being able to control this, i think it just simulates the transaction, and displays the output preview.

With my experience, i've seen that when you sign multiple transactions at once, wallet is almost never showing preview of the result.

So, my opinion is that it's linked to complexity of the transaction (accounts involved, etc), and may be network/blockchain speed (tps)

When you say that you get a question mark, what kind of transaction is it ? (and is it multiple transactions ?)

2
  • thanks, i guess i'm wondering where it's being simulated, it must be in the wallet code right. so, maybe it's wallet-specific? in that case, maybe each wallet has different "give-up" criteria and might be specific to how they are doing the simulation. for my app its a single tx with many ix.
    – joebuild
    Commented Sep 15, 2023 at 17:29
  • i think it's simulated blockchain wise, and the wallet get the result.
    – Effe2
    Commented Sep 15, 2023 at 22:08
0

I think the transaction simulation feature doesn't seem to be perfect yet. Especially in the case of multiple transactions, simulation failures are quite common. Moreover, if there are many instructions to be executed in a transaction, it takes a long time. Additionally, network speed might also have an impact.

1
  • i don't see how this could be the entire explanation. web clients have way more processing power than the CU of a tx.
    – joebuild
    Commented Sep 17, 2023 at 17:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.