mirror of
https://github.com/status-im/snt-gas-relay.git
synced 2025-02-28 05:30:28 +00:00
Updated friendsRecovery.js to work with embark
This commit is contained in:
parent
8c5b72490f
commit
7235aa85d7
@ -8,4 +8,26 @@ contract TestContract {
|
|||||||
function test() public {
|
function test() public {
|
||||||
TestFunctionExecuted();
|
TestFunctionExecuted();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Helper function to be used in unit testing due to error in web3
|
||||||
|
web3.utils.soliditySha3([1, 2, 3])
|
||||||
|
Error: Autodetection of array types is not supported.
|
||||||
|
at _processSoliditySha3Args (node_modules/web3-utils/src/soliditySha3.js:176:15)
|
||||||
|
*/
|
||||||
|
function hash(
|
||||||
|
address identity,
|
||||||
|
bytes32 _revealedSecret,
|
||||||
|
address _dest,
|
||||||
|
bytes _data,
|
||||||
|
bytes32 _newSecret,
|
||||||
|
bytes32[] _newFriendsHashes)
|
||||||
|
public
|
||||||
|
pure
|
||||||
|
returns(bytes32)
|
||||||
|
{
|
||||||
|
return keccak256(identity, _revealedSecret, _dest, _data, _newSecret, _newFriendsHashes);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -3,12 +3,11 @@ const Embark = require('embark');
|
|||||||
let EmbarkSpec = Embark.initTests();
|
let EmbarkSpec = Embark.initTests();
|
||||||
let web3 = EmbarkSpec.web3;
|
let web3 = EmbarkSpec.web3;
|
||||||
|
|
||||||
const identityJson = require('../build/contracts/Identity.json');
|
const identityJson = require('../dist/contracts/Identity.json');
|
||||||
const updatedIdentityKernelJson = require('../build/contracts/UpdatedIdentityKernel.json');
|
const updatedIdentityKernelJson = require('../dist/contracts/UpdatedIdentityKernel.json');
|
||||||
|
|
||||||
const TestUtils = require("../utils/testUtils.js")
|
const TestUtils = require("../utils/testUtils.js")
|
||||||
const idUtils = require("../utils/identityUtils.js")
|
const idUtils = require("../utils/identityUtils.js")
|
||||||
const web3EthAbi = require("web3-eth-abi");
|
|
||||||
|
|
||||||
describe('IdentityFactory', function(accounts) {
|
describe('IdentityFactory', function(accounts) {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user