Disabling EIP1102 changes
This commit is contained in:
parent
fc5398fddf
commit
93de9e7949
|
@ -2,10 +2,10 @@
|
|||
<head>
|
||||
<title>#criptolife@status.im</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="css/app.css">
|
||||
<link rel="stylesheet" href="css/app.7.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script src="js/dapp.1.js"></script>
|
||||
<script src="js/dapp.7.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -29,34 +29,6 @@ class App extends React.Component {
|
|||
|
||||
componentDidMount(){
|
||||
EmbarkJS.onReady(async (error) => {
|
||||
alert(1);
|
||||
// Modern dapp browsers...
|
||||
if (window.ethereum) {
|
||||
alert(2);
|
||||
window.web3 = new Web3(ethereum);
|
||||
try {
|
||||
alert(3);
|
||||
// Request account access if needed
|
||||
await ethereum.enable();
|
||||
alert(4);
|
||||
this.setup();
|
||||
} catch (error) {
|
||||
alert('Access to ETH wallet required to send funds');
|
||||
}
|
||||
}
|
||||
// Legacy dapp browsers...
|
||||
else if (window.web3) {
|
||||
window.web3 = new Web3(web3.currentProvider);
|
||||
this.setup();
|
||||
}
|
||||
// Non-dapp browsers...
|
||||
else {
|
||||
alert('Non-Ethereum browser detected. You should consider using Status.im!');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
setup(){
|
||||
const accounts = await web3.eth.getAccounts();
|
||||
|
||||
if(!accounts.length){
|
||||
|
@ -80,12 +52,11 @@ class App extends React.Component {
|
|||
} else {
|
||||
this.setState({error: true, errorMessage: error.message});
|
||||
}
|
||||
alert(error);
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
async redirectIfProcessed(code, intervalCheck){
|
||||
const sentToAddress = await SNTGiveaway.methods.sentToAddress(web3.eth.defaultAccount).call({from: web3.eth.defaultAccount});
|
||||
const usedCode = await SNTGiveaway.methods.codeUsed( '0x' + code,).call({from: web3.eth.defaultAccount});
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"contracts": ["contracts/**"],
|
||||
"app": {
|
||||
"css/app.css": ["app/css/**"],
|
||||
"js/dapp.1.js": ["app/js/index.js"],
|
||||
"css/app.7.css": ["app/css/**"],
|
||||
"js/dapp.7.js": ["app/js/index.js"],
|
||||
"images/": ["app/images/**"],
|
||||
"fonts/": ["app/fonts/**"],
|
||||
"index.html": "app/index.html"
|
||||
|
|
Loading…
Reference in New Issue