Skip to content

Commit

Permalink
remove leading _ from overridden Transfer event. Openzeppelin says th…
Browse files Browse the repository at this point in the history
…at's ok: OpenZeppelin/openzeppelin-contracts#370. Adapted tests so that they don't fail. refs #1
  • Loading branch information
d10r committed May 29, 2019
1 parent 4681c59 commit 2758a77
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion contracts/IERC20xx.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface IERC20xx {
function closeStream(uint256 streamId) external;

// overrides ERC20 event, adding a field "_type"
event Transfer(address indexed _from, address indexed _to, uint256 _value, TransferType _type);
event Transfer(address indexed from, address indexed to, uint256 value, TransferType transferType);
event StreamOpened(uint256 id, address indexed from, address indexed to, uint256 flowrate, uint256 maxAmount);
event StreamClosed(uint256 id, uint256 transferredAmount, uint256 outstandingAmount);
}
Expand Down
12 changes: 6 additions & 6 deletions test/eip20.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,17 +200,17 @@ exports.test = function(web3, accounts, ERC20CompatibleToken) {
it('events: should fire Transfer event properly', async () => {
const res = await HST.transfer(accounts[1], '2666', {from: accounts[0]});
const transferLog = res.logs.find(element => element.event.match('Transfer'));
assert.strictEqual(transferLog.args._from, accounts[0]);
assert.strictEqual(transferLog.args._to, accounts[1]);
assert.strictEqual(transferLog.args._value.toString(), '2666');
assert.strictEqual(transferLog.args[0], accounts[0]);
assert.strictEqual(transferLog.args[1], accounts[1]);
assert.strictEqual(transferLog.args[2].toString(), '2666');
});

it('events: should fire Transfer event normally on a zero transfer', async () => {
const res = await HST.transfer(accounts[1], '0', {from: accounts[0]});
const transferLog = res.logs.find(element => element.event.match('Transfer'));
assert.strictEqual(transferLog.args._from, accounts[0]);
assert.strictEqual(transferLog.args._to, accounts[1]);
assert.strictEqual(transferLog.args._value.toString(), '0');
assert.strictEqual(transferLog.args[0], accounts[0]);
assert.strictEqual(transferLog.args[1], accounts[1]);
assert.strictEqual(transferLog.args[2].toString(), '0');
});

it('events: should fire Approval event properly', async () => {
Expand Down

0 comments on commit 2758a77

Please sign in to comment.