mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-11 14:24:24 +00:00
use secureSend for SimpleStorage set as it can cause hangs on WS
This commit is contained in:
parent
13e0d453ae
commit
f45c7bc256
@ -1,6 +1,7 @@
|
||||
/*global contract, config, it, assert, web3*/
|
||||
const SimpleStorage = require('Embark/contracts/SimpleStorage');
|
||||
let accounts;
|
||||
const Utils = require('embarkjs').Utils;
|
||||
|
||||
config({
|
||||
contracts: {
|
||||
@ -21,10 +22,16 @@ contract("SimpleStorage", function () {
|
||||
assert.strictEqual(parseInt(result, 10), 100);
|
||||
});
|
||||
|
||||
it("set storage value", async function () {
|
||||
await SimpleStorage.methods.set(150).send();
|
||||
it("set storage value", function (done) {
|
||||
// await SimpleStorage.methods.set(150).send();
|
||||
Utils.secureSend(web3, SimpleStorage.methods.set(150), {}, false, async function(err) {
|
||||
if (err) {
|
||||
return done(err);
|
||||
}
|
||||
let result = await SimpleStorage.methods.get().call();
|
||||
assert.strictEqual(parseInt(result, 10), 150);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it("should set defaultAccount", async function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user