Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Algorand Coding Challenge Submission
What was the bug?
What was the bug?
->given code after debugging gives an error at
1."""ptxn.receiver==Global.current_application_id"""
2."""txn.sender, global.current_application_address"""
the above are coparing the adress type and application type
->in one expression, ptxn.reciver returns the address type global.current_application_id returns the application type comparing both gives an error.
->in second expression ,op.app_opted_in method is comparing the txt.sender(return application type )
How did you fix the bug?
to solve one we need to use the current_application_address(returns addres type)method in Global class{
Global.current_application_address}
->to solve secondone we need to use the current_application_address(return address type)method in Global class{
Global.current_application_id}
Console Screenshot: