You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am following your tutorial to create a simple Dapp using React. So far everything looks fine except when I tried it on my another browser that doesn't has MetaMask installed.
pragma solidity ^0.4.17;
import 'zeppelin-solidity/contracts/token/ERC20/StandardToken.sol';
contract TutorialToken is StandardToken {
string public name = 'TutorialToken';
string public symbol = 'TUT';
uint8 public decimals = 2;
uint public INITIAL_SUPPLY = 1000000;
function TutorialToken() public {
totalSupply_ = INITIAL_SUPPLY;
balances[msg.sender] = INITIAL_SUPPLY;
}
}
My browsers:
Chrome - no MetaMask installed
Firefox - has MetaMask installed and connected to my private blockchain (Geth with websocket)
Hi,
I am following your tutorial to create a simple Dapp using React. So far everything looks fine except when I tried it on my another browser that doesn't has MetaMask installed.
Before that, this is my App.js file:
And, this is the contract:
My browsers:
Accounts
0x802b6e099e7a306cd769f20a692001ab4b9a2e6e
0x65A347c340981356CE8FDc76d877021091822a11
The problem
When I look at my Firefox (with MetaMask installed), I can see the
0x65A347c340981356CE8FDc76d877021091822a11
has0
token. This is expected.On Firefox:
But when I look at my Chrome (doesn't has MetaMask installed), it shows Etherbase/Coinbase account with
1000000
TUT tokens.On Chrome:
That's odd. The expected behaviour in Chrome is not to show any address and the balance should be
0
because I don't have MetaMask installed in Chrome.The help that I need now
How do I achieve the following:
Please install MetaMask
message when user doesn't has MetaMask installed?AppContainer
from being initialized when MetaMask is not installed?accounts
state from taking Etherbase/Coinbase address when MetaMask isn't installed?The source code for this project can be found here.
Thank you in advance!
The text was updated successfully, but these errors were encountered: