clean up embark.js
This commit is contained in:
parent
d0afd27969
commit
5f6ec0f584
|
@ -20,8 +20,6 @@ EmbarkJS.Contract = function(options) {
|
||||||
this.code = '0x' + options.code;
|
this.code = '0x' + options.code;
|
||||||
//this.web3 = options.web3 || web3;
|
//this.web3 = options.web3 || web3;
|
||||||
this.web3 = options.web3 || window.web3;
|
this.web3 = options.web3 || window.web3;
|
||||||
console.log("set web3");
|
|
||||||
console.log(this.web3);
|
|
||||||
|
|
||||||
if (EmbarkJS.isNewWeb3()) {
|
if (EmbarkJS.isNewWeb3()) {
|
||||||
// TODO:
|
// TODO:
|
||||||
|
@ -214,8 +212,6 @@ EmbarkJS.Storage.getUrl = function(hash) {
|
||||||
};
|
};
|
||||||
|
|
||||||
EmbarkJS.Storage.setProvider = function(provider, options) {
|
EmbarkJS.Storage.setProvider = function(provider, options) {
|
||||||
console.log("setting provider");
|
|
||||||
console.log(arguments);
|
|
||||||
var self = this;
|
var self = this;
|
||||||
var promise = new Promise(function(resolve, reject) {
|
var promise = new Promise(function(resolve, reject) {
|
||||||
if (provider.toLowerCase() === EmbarkJS.Storage.Providers.IPFS) {
|
if (provider.toLowerCase() === EmbarkJS.Storage.Providers.IPFS) {
|
||||||
|
@ -232,7 +228,6 @@ EmbarkJS.Storage.setProvider = function(provider, options) {
|
||||||
self.ipfsConnection = IpfsApi(options.server, options.port);
|
self.ipfsConnection = IpfsApi(options.server, options.port);
|
||||||
self._getUrl = options.getUrl || "http://localhost:8080/ipfs/";
|
self._getUrl = options.getUrl || "http://localhost:8080/ipfs/";
|
||||||
}
|
}
|
||||||
window.ipfsConnection = self.ipfsConnection;
|
|
||||||
resolve(self);
|
resolve(self);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
@ -678,6 +673,4 @@ EmbarkJS.Utils = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//module.exports = EmbarkJS;
|
|
||||||
|
|
||||||
export default EmbarkJS;
|
export default EmbarkJS;
|
||||||
|
|
Loading…
Reference in New Issue