leonardocustodio / polkadart

Polkadart provides developers the ability to query a node and interact with the Polkadot based chains using Dart.
https://polkadart.dev
Apache License 2.0
39 stars 16 forks source link

Correct way to catch tx errors #436

Closed poka-IT closed 8 months ago

poka-IT commented 8 months ago

I am currently experiencing an issue with handling transaction errors in your library. Specifically, I'm unable to catch errors for transactions.

await author.submitAndWatchExtrinsic(srExtrinsic,
    (data) => log.d('From here: ${data.type} - ${data.value}'));

The problem is that data always indicates a successful blockchain submission, even when the extrinsic fails. Is there a recommended way to catch and handle these transaction errors using your library?