Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Opt Into Asset #404

Closed
gidonkatten opened this issue Jul 5, 2021 · 2 comments
Closed

Cannot Opt Into Asset #404

gidonkatten opened this issue Jul 5, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@gidonkatten
Copy link

Describe the bug

You cannot opt into an asset using asset transfer transaction.

Expected Behavior

Should be able to opt into an asset with asset transfer transaction.

Current Behavior

Error: RUNTIME_ERR1404: Account ENBABX5NX4CCBETS2MJWYFIGTXA6TVTML7FBDLNR4NIPMYEKT2VHM7JWEQ doesn't hold asset index 1

from this line https://github.com/scale-it/algo-builder/blob/master/packages/runtime/src/ctx.ts#L277

Possible Solution

You should catch the error thrown and check for this https://github.com/scale-it/algo-builder/blob/master/packages/runtime/src/ctx.ts#L281 and then only throw the error if you are not opting into asset.

Steps to Reproduce

Create runtime asset transfer transaction with 0 amount and same sender and asset receiver.

@gidonkatten gidonkatten added the bug Something isn't working label Jul 5, 2021
@ratik21 ratik21 self-assigned this Jul 5, 2021
@ratik21
Copy link
Member

ratik21 commented Jul 6, 2021

@gidonkatten thanks for spotting. It is a bug.

@ratik21
Copy link
Member

ratik21 commented Jul 12, 2021

fixed in v1.1.1

@ratik21 ratik21 closed this as completed Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants