Skip to content
This repository was archived by the owner on Dec 31, 2024. It is now read-only.

Commit 3dc305a

Browse files
committed
get everything working again after the merge
1 parent 3a071d1 commit 3dc305a

File tree

5 files changed

+27
-15
lines changed

5 files changed

+27
-15
lines changed

config/contracts.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,21 @@ module.exports = {
5454
'$WEB3', // uses pre existing web3 object if available (e.g in Mist)
5555
],
5656
contracts: {
57+
RecoveryVault: {},
5758
LPVault: {},
5859
LiquidPledgingMock: {},
59-
RecoveryVault: {},
60+
Kernel: {
61+
args: {
62+
_shouldPetrify: 'false',
63+
},
64+
},
65+
ACL: {},
66+
DAOFactory: {
67+
args: ['$Kernel', '$ACL', '0x0000000000000000000000000000000000000000'],
68+
},
6069
LPFactory: {
6170
args: {
71+
_daoFactory: '$DAOFactory',
6272
_vaultBase: '$LPVault',
6373
_lpBase: '$LiquidPledgingMock',
6474
},

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
"test": "embark test",
1212
"compile:sol": "embark build --contracts",
1313
"compile:js": "babel -d lib/ js/",
14-
"compile": "npm run compile:sol && npm run compile:js",
15-
"build": "npm run compile",
14+
"build": "npm run compile:sol && npm run compile:js",
1615
"prepublish": "npm run build"
1716
},
1817
"repository": {

test/LPVault.js

-6
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@ describe('LPVault test', function() {
2727
vaultOwner = accounts[3];
2828
escapeHatchCaller = accounts[4];
2929
restrictedPaymentsConfirmer = accounts[5];
30-
31-
recoveryVault = deployment.recoveryVault;
32-
vault = deployment.vault;
33-
liquidPledging = deployment.liquidPledging;
34-
liquidPledgingState = deployment.liquidPledgingState;
35-
token = deployment.token;
3630
});
3731

3832
it('Should deploy LPVault contract', async function() {

test/NormalOperation.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ const { assert } = require('chai');
66
const deployLP = require('./helpers/deployLP');
77
const assertFail = require('./helpers/assertFail');
88

9+
const { toBN, toWei, fromWei } = utils;
10+
911
const printState = async liquidPledgingState => {
1012
const st = await liquidPledgingState.getState();
1113
console.log(JSON.stringify(st, null, 2));
@@ -118,7 +120,9 @@ describe('LiquidPledging test', function() {
118120
assert.equal(res[4], 86400);
119121
});
120122
it('Should make a donation', async () => {
121-
const r = await liquidPledging.donate(1, 1, giver1Token.$address, utils.toWei('1'), {
123+
const giver1PreBal = await giver1Token.balanceOf(giver1);
124+
125+
await liquidPledging.donate(1, 1, giver1Token.$address, utils.toWei('1'), {
122126
from: giver1,
123127
$extraGas: 100000,
124128
});
@@ -128,9 +132,10 @@ describe('LiquidPledging test', function() {
128132
assert.equal(p.amount, utils.toWei('1'));
129133
assert.equal(p.owner, 1);
130134
const vaultBal = await giver1Token.balanceOf(vault.$address);
131-
const giver1Bal = await giver1Token.balanceOf(giver1);
135+
const giver1PostBal = await giver1Token.balanceOf(giver1);
136+
132137
assert.equal(vaultBal, web3.utils.toWei('1'));
133-
assert.equal(giver1Bal, web3.utils.toWei('999'));
138+
assert.equal(giver1PostBal, toBN(giver1PreBal).sub(toBN(toWei('1'))).toString());
134139
});
135140
it('Should create a delegate', async () => {
136141
await liquidPledging.addDelegate(

test/helpers/deployLP.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,14 @@ config(
1414
RecoveryVault: {},
1515
LPVault: {},
1616
LiquidPledgingMock: {},
17-
Kernel: {},
17+
Kernel: {
18+
args: {
19+
_shouldPetrify: 'false',
20+
},
21+
},
1822
ACL: {},
1923
DAOFactory: {
20-
args: ['$Kernel','$ACL', '0x0000000000000000000000000000000000000000']
24+
args: ['$Kernel', '$ACL', '0x0000000000000000000000000000000000000000'],
2125
},
2226
LPFactory: {
2327
args: {
@@ -27,7 +31,7 @@ config(
2731
},
2832
},
2933
StandardToken: {},
30-
}
34+
},
3135
},
3236
(err, theAccounts) => {
3337
accounts = theAccounts;

0 commit comments

Comments
 (0)