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

is_opted_in breaks on fresh accounts #7

Closed
epequeno opened this issue Nov 11, 2021 · 0 comments · Fixed by #10
Closed

is_opted_in breaks on fresh accounts #7

epequeno opened this issue Nov 11, 2021 · 0 comments · Fixed by #10

Comments

@epequeno
Copy link

account_info = self.algod.account_info(user_address)
for a in account_info['apps-local-state']:

This assumes the apps-local-state key exists in the account info. I'm currently using a sandbox testnet node with a newly created account which has not opted in to any application.

The response I'm getting from algod_client.account_info(addr) is:

{
  "round": 17821013,
  "address": "...",
  "amount": 0,
  "pendingrewards": 0,
  "amountwithoutpendingrewards": 0,
  "rewards": 0,
  "status": "Offline"
}
fergalwalsh added a commit that referenced this issue Nov 17, 2021
fergalwalsh added a commit that referenced this issue Nov 17, 2021
Fix issue #7 - Checking optin on fresh accounts
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

Successfully merging a pull request may close this issue.

1 participant