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

Opting in to ALGO throws an index error #30

Closed
RcrossF opened this issue Mar 14, 2022 · 1 comment
Closed

Opting in to ALGO throws an index error #30

RcrossF opened this issue Mar 14, 2022 · 1 comment

Comments

@RcrossF
Copy link
Contributor

RcrossF commented Mar 14, 2022

Calling client.prepare_asset_optin_transactions(0) throws

txns = client.prepare_asset_optin_transactions(asset.id, ADDRESS)
  File "D:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\tinyman\v1\client.py", line 49, in prepare_asset_optin_transactions
    txn_group = prepare_asset_optin_transactions(
  File "D:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\tinyman\v1\optin.py", line 20, in prepare_asset_optin_transactions
    txn = AssetOptInTxn(
  File "D:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\algosdk\future\transaction.py", line 1436, in __init__
    super().__init__(
  File "D:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\algosdk\future\transaction.py", line 1354, in __init__
    self.index = self.creatable_index(index, required=True)
  File "D:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\algosdk\future\transaction.py", line 301, in creatable_index
    raise IndexError("Required an index")
IndexError: Required an index

As I understand it this should never actually be used. I've added a check in #31 to address this

@gokselcoban
Copy link
Contributor

Thank you for raising this issue. I agree with you; it shouldn't be used for ALGO (0 asset id for Tinyman SDK).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants