Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (14 sloc) 574 Bytes
var elm_ethereum_ports = require('elm-ethereum-ports');
var Elm = require( '../../src/Main' );
window.addEventListener('load', function () {
if (typeof web3 !== 'undefined') {
web3.version.getNetwork(function (e, networkId) {
app = Elm.Main.fullscreen(parseInt(networkId));
elm_ethereum_ports.txSentry(app.ports.txOut, app.ports.txIn, web3);
elm_ethereum_ports.walletSentry(app.ports.walletSentry, web3);
});
} else {
app = Elm.Main.fullscreen(0);
console.log("Metamask not detected.");
}
});