You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Submitting a transaction and getting its results is currently a two-step process:
Submit the transaction,
Get its results via the TransactionResponse class
This is the default workflow and should remain the default one because a transaction can take an indefinite amount of time to execute on the node and using submitAndAwait as the default would block our users from executing anything on their side until the node executes the transaction.
However, we should allow our users to submit and await the results of the transaction execution in one call if they wish to do so. The main benefit of this single call over splitting it into two calls (submit and and subscribe to statusChange) is that the transaction might fail or be squeezed out in-between the submitting and subscribing, which would result in the subscription call never getting an update and thus never ending. This would be because the node immediately deletes a failed and squeezed-out transaction and us requesting that deleted transaction would hang to infinity.
A possible implementation of this would be to expand the current ProviderSendTxParams type:
These ProviderSendTxParams can then be forwarded via FunctionInvocationScope.call(), Account.transfer() and the like so the user can set the desired behavior through a flag, e.g.:
Submitting a transaction and getting its results is currently a two-step process:
TransactionResponse
classThis is the default workflow and should remain the default one because a transaction can take an indefinite amount of time to execute on the node and using
submitAndAwait
as the default would block our users from executing anything on their side until the node executes the transaction.However, we should allow our users to submit and await the results of the transaction execution in one call if they wish to do so. The main benefit of this single call over splitting it into two calls (submit and and subscribe to
statusChange
) is that the transaction might fail or be squeezed out in-between the submitting and subscribing, which would result in the subscription call never getting an update and thus never ending. This would be because the node immediately deletes a failed and squeezed-out transaction and us requesting that deleted transaction would hang to infinity.A possible implementation of this would be to expand the current
ProviderSendTxParams
type:These
ProviderSendTxParams
can then be forwarded viaFunctionInvocationScope.call()
,Account.transfer()
and the like so the user can set the desired behavior through a flag, e.g.:The text was updated successfully, but these errors were encountered: