Use uint32 for kreditsWithdrawn
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

Same as the properties and functions in the Contribution contract
This commit is contained in:
Râu Cao
2022-08-27 10:29:56 +02:00
parent e99184b83f
commit 5da710cc14
2 changed files with 4 additions and 6 deletions

View File

@@ -95,10 +95,8 @@ describe("Contributor contract", async function () {
expect(c['balance']).to.equal(0);
await Contributor.connect(addr1).withdraw();
c = await Contributor.getContributorById(2);
// TODO Are we required to use Wei for ERC20 tokens?
expect(c['balance'].toString()).to.equal("6500000000000000000000");
// FIXME This is also a BigNumber (uint256), but stored at Wei reolution
expect(c['kreditsWithdrawn'].toString()).to.equal('6500');
expect(c['kreditsWithdrawn']).to.equal(6500);
});
it("requires the withdrawable amount to be larger than 0", async function () {