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
This was reported by @cusma. The main reason is potential confusion that can be caused by the fact that user has ability to specify on complete in transaction parameters, yet its ignored in some scenarios like opt_in (where it overwrites the oncomplete to use OptInOC).
For instance:
app_client.opt_in( # this internally is actually going to ignore the on_compete from user and set it to OptInOCtransaction_parameters=OnCompleteCallParameters(
on_complete=OnComplete.DeleteApplicationOC
),
)
As seen above, the usage may be confusing, we either want to limit ability to use OnCompleteCallParameters (currently its a sub class of transaction params hence why it works) or account to prioritize taking the on_complete from transaction params if present.
Further notes
Based on discussion with @daniel-makerx and proposed fix in #79, the OnCompleteCallParameters and CreateTransactionParameters are no longer subclassing from common TransactionParameters.
@neilcampbell noted down issues with the propagated fix as they had additional implications on the generator-py repo that were not caught as part of the 2.2.2 release. Originally, the fix was propagated under 2.2.2, we then reverted the changes under 2.3.0 given that a heap of upstream changes would require a more thorough release coordination on beaker, beaker and python template, algokit-cli repos that we didn't account for when tagging this as a minor fix. Hence, after re evaluating the initial issue report and higher priority items around puya at the moment we decided to revert the #79 changes, log it as a proper github issue on the repo and address with proper cross repo release coordination and smoke testing. This is also due to the fact that a proper semantic tag would require a breaking change in version (v3) and this would also imply additional release coordination.
@cusma will ping you as soon as the bug is resolved properly.
The text was updated successfully, but these errors were encountered:
robdmoore
changed the title
Fix on_complete behaviour on application client calls
Improve confusing on_complete behaviour on application client calls
Jan 9, 2025
Unless on_complete is explicitly set in params, it will fill the expected OnComplete per operation otherwise it will respect the custom value provided as seen in
Hence this addresses the previous behaviour where client would not respect custom values passed in on_completes for operations that were hardcoding expected values. (cc @cusma).
Subject of the issue
This was reported by @cusma. The main reason is potential confusion that can be caused by the fact that user has ability to specify on complete in transaction parameters, yet its ignored in some scenarios like opt_in (where it overwrites the oncomplete to use OptInOC).
For instance:
As seen above, the usage may be confusing, we either want to limit ability to use OnCompleteCallParameters (currently its a sub class of transaction params hence why it works) or account to prioritize taking the on_complete from transaction params if present.
Further notes
Based on discussion with @daniel-makerx and proposed fix in #79, the OnCompleteCallParameters and CreateTransactionParameters are no longer subclassing from common TransactionParameters.
@neilcampbell noted down issues with the propagated fix as they had additional implications on the generator-py repo that were not caught as part of the 2.2.2 release. Originally, the fix was propagated under 2.2.2, we then reverted the changes under 2.3.0 given that a heap of upstream changes would require a more thorough release coordination on beaker, beaker and python template, algokit-cli repos that we didn't account for when tagging this as a minor fix. Hence, after re evaluating the initial issue report and higher priority items around puya at the moment we decided to revert the #79 changes, log it as a proper github issue on the repo and address with proper cross repo release coordination and smoke testing. This is also due to the fact that a proper semantic tag would require a breaking change in version (v3) and this would also imply additional release coordination.
@cusma will ping you as soon as the bug is resolved properly.
The text was updated successfully, but these errors were encountered: