revert web3.js version check

This commit is contained in:
Iuri Matias 2017-12-13 17:10:33 -05:00
parent e2dcad07ce
commit d0afd27969
2 changed files with 16 additions and 17 deletions

View File

@ -3,12 +3,11 @@
var EmbarkJS = {};
EmbarkJS.isNewWeb3 = function() {
return true;
//var _web3 = new Web3();
//if (typeof(_web3.version) === "string") {
// return true;
//}
//return parseInt(_web3.version.api.split('.')[0], 10) >= 1;
var _web3 = new Web3();
if (typeof(_web3.version) === "string") {
return true;
}
return parseInt(_web3.version.api.split('.')[0], 10) >= 1;
};
EmbarkJS.Contract = function(options) {

View File

@ -59,19 +59,19 @@ $(document).ready(function() {
//EmbarkJS.Storage.setProvider('ipfs',{server: 'localhost', port: '5001'});
$("#storage .error").hide();
//EmbarkJS.Storage.ipfsConnection.ping()
//.then(function(){
//EmbarkJS.Storage.ipfsConnection.version()
// .then(function(){
$("#status-storage").addClass('status-online');
$("#storage-controls").show();
//})
//.catch(function(err) {
// if(err){
// console.log("IPFS Connection Error => " + err.message);
// $("#storage .error").show();
// $("#status-storage").addClass('status-offline');
// $("#storage-controls").hide();
// }
//});
// })
// .catch(function(err) {
// if(err){
// console.log("IPFS Connection Error => " + err.message);
// $("#storage .error").show();
// $("#status-storage").addClass('status-offline');
// $("#storage-controls").hide();
// }
// });
$("#storage button.setIpfsText").click(function() {
var value = $("#storage input.ipfsText").val();