Open aaroncox opened 3 years ago
I'm worried about false positives here, with the flow you proposed the user would be prevented from transacting if the resource provider stops a transaction that would actually go through if submitted normally.
I think a better approach would be for the transport to store the error from the resource provider and if the transaction is submitted and gets a resource error we surface the stored error instead.
During the Resource Provider sampling process, we can catch errors involving the transaction before its sent to the users wallet. These aren't resource errors, they are errors with the contract the user is trying to interact with. Currently these errors are returned as part of the API response but not surfaced to the user. The current flow is:
We should change the transport to surface the errors that occur during sampling. The flow should be: