mirror of https://github.com/embarklabs/embark.git
fix missing default from
This commit is contained in:
parent
72da3b4a35
commit
d647ea791e
|
@ -113,7 +113,7 @@ class Test {
|
||||||
async.each(Object.keys(self.contracts), (contractName, eachCb) => {
|
async.each(Object.keys(self.contracts), (contractName, eachCb) => {
|
||||||
const contract = self.engine.contractsManager.contracts[contractName];
|
const contract = self.engine.contractsManager.contracts[contractName];
|
||||||
Object.assign(self.contracts[contractName], new self.web3.eth.Contract(contract.abiDefinition, contract.address,
|
Object.assign(self.contracts[contractName], new self.web3.eth.Contract(contract.abiDefinition, contract.address,
|
||||||
{from: self.web3.defaultAccount, gas: 6000000}));
|
{from: self.web3.eth.defaultAccount, gas: 6000000}));
|
||||||
eachCb();
|
eachCb();
|
||||||
}, next);
|
}, next);
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,8 @@ class Test {
|
||||||
return this.contracts[contractName];
|
return this.contracts[contractName];
|
||||||
}
|
}
|
||||||
const contract = this.engine.contractsManager.contracts[contractName];
|
const contract = this.engine.contractsManager.contracts[contractName];
|
||||||
this.contracts[contractName] = new this.web3.eth.Contract(contract.abiDefinition, contract.address);
|
this.contracts[contractName] = new this.web3.eth.Contract(contract.abiDefinition, contract.address,
|
||||||
|
{from: this.web3.eth.defaultAccount, gas: 6000000});
|
||||||
return this.contracts[contractName];
|
return this.contracts[contractName];
|
||||||
}
|
}
|
||||||
throw new Error(__('Unknown module %s', module));
|
throw new Error(__('Unknown module %s', module));
|
||||||
|
|
|
@ -25,7 +25,7 @@ contract("SimpleStorage", function () {
|
||||||
|
|
||||||
it("set storage value", async function () {
|
it("set storage value", async function () {
|
||||||
// TODO Solve from
|
// TODO Solve from
|
||||||
await SimpleStorage.methods.set(150).send({from: web3.eth.defaultAccount});
|
await SimpleStorage.methods.set(150).send();
|
||||||
let result = await SimpleStorage.methods.get().call();
|
let result = await SimpleStorage.methods.get().call();
|
||||||
assert.strictEqual(parseInt(result, 10), 499650);
|
assert.strictEqual(parseInt(result, 10), 499650);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue