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

Error when deploying contract when MetaMask is not available #404

Open
filippsen opened this issue Mar 31, 2019 · 0 comments
Open

Error when deploying contract when MetaMask is not available #404

filippsen opened this issue Mar 31, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@filippsen
Copy link
Contributor

Environment/Browser

Superblocks 2.0

Description

Type error due to undefined object when trying to deploy contract on a browser which doesn't have Metamask installed.

Originally reported by @Spejbl: issue #401 (review)

Steps to reproduce

  1. Make sure MetaMask is not available or accessible
  2. Click Deploy

Expected result

No errors.

Actual result

image

Hints and possible solutions

Variable row contains this:
image

We are probably using some functions from web3 which are not injected without Metamask.

the previous deployer version contained a runtime check-and-swap action that would choose between the internal web3 object and the externally provided one. Now, when the account is set to external (or 'metamask' ?), the new deployer is probably assuming window.web3 is always valid.

./src/services/deployer/deployRunner.ts:37: this.currWeb3 = account.type === 'metamask' ? window.web3 : getWeb3(this.environment.endpoint);

@filippsen filippsen added the bug Something isn't working label Mar 31, 2019
@filippsen filippsen mentioned this issue Mar 31, 2019
48 tasks
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

1 participant