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

allow accounts[0] to be undefined #236

Open
dkent600 opened this issue Jun 1, 2018 · 6 comments
Open

allow accounts[0] to be undefined #236

dkent600 opened this issue Jun 1, 2018 · 6 comments
Assignees

Comments

@dkent600
Copy link
Contributor

dkent600 commented Jun 1, 2018

Allow accounts[0] to be undefined. Issue a logged warning instead of throwing an exception.

This allows for cases where arc.js is used in read-only situations.

When undefined, don't set a default user in Utils.requireContract.

@dkent600
Copy link
Contributor Author

dkent600 commented Jun 1, 2018

A possible related feature would be to provide some means of reinitializing WrapperService when the default user account changes.

@dkent600
Copy link
Contributor Author

dkent600 commented Jun 1, 2018

@tibetsprague

@tibetsprague
Copy link
Contributor

So then Alchemy would have to check if the default account exists or not?

@tibetsprague
Copy link
Contributor

would love to have arc.js auto detect account changes

@dkent600
Copy link
Contributor Author

dkent600 commented Jun 1, 2018

@tibetsprague

Yes, the application (Alchemy) would need to check if the default account exists. No more exception in that case.

I will create a new ticket on creating a Pub/Sub event for when the account changes.

@dkent600
Copy link
Contributor Author

dkent600 commented Nov 18, 2018

When the user finally sets the default account, the application will have to re-invoke InitializeArcJs. You can use the existing Arc.js subsystem for watching for account changes.

@dkent600 dkent600 self-assigned this Nov 18, 2018
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