Choosing a method
prepareExecute
Fire-and-forget. Resolves to
null as soon as the transaction is submitted. Use when you don’t need the committed result inline.prepareExecuteAndWait
Waits for the transaction to commit and returns the result. Use when your UI needs to react to the committed outcome.
params — a commands array — and both open a popup for the user to review and sign.
Submitting commands
commands array can contain more than one command; Walley submits them together in a single transaction, so they commit atomically — either all succeed or none do.
Always call
prepareExecute / prepareExecuteAndWait from a user gesture. The submission opens a popup, and browsers block popups that aren’t triggered by user interaction.Waiting for the result
prepareExecuteAndWait resolves once the transaction is committed, so you can update your UI directly off the returned result:
providerErrors.userRejectedRequest. Handle it as a normal cancellation rather than an error state.
Network fees
The Canton Network charges traffic for transactions. Walley handles this for you — your dApp never calculates, quotes, or pays a network fee. Walley charges the fee in the same movement as the transaction itself and assumes the user covers it. There is no separate fee step, no deferred settlement, and no follow-up prompt inside the wallet — the fee rides along with the commands you submit.When the user exits the popup
IfprepareExecute / prepareExecuteAndWait rejects because the user closed or exited the popup, one possible cause is that they have skipped paying a previous fee. In that case Walley will refuse the new transaction until the outstanding fee is settled.
Outstanding fees aren’t paid from your dApp. Direct the user to walley.cc to settle them, then have them retry the transaction.