Skip to content

Commit

Permalink
Remove SignatureBouncer from drafts (#1879)
Browse files Browse the repository at this point in the history
* Remove SignatureBouncer

* Update changelog entry

* Fix coverage

* Update CHANGELOG.md
  • Loading branch information
nventuro committed Aug 16, 2019
1 parent 89d07a2 commit 226c6bd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 274 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
* `Address.isContract`: switched from `extcodesize` to `extcodehash` for less gas usage. ([#1802](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1802))
* `SafeMath`: added custom error messages support for `sub`, `div` and `mod` functions. `ERC20` and `ERC777` updated to throw custom errors on subtraction overflows. ([#1828](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1828))

### Bugfixes
### Breaking changes in drafts:
* `SignatureBouncer` has been removed from the library, both to avoid confusions with the GSN Bouncers and `GSNBouncerSignature` and because the API was not very clear. ([#1879](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1879))

## 2.3.0 (2019-05-27)

Expand Down
50 changes: 0 additions & 50 deletions contracts/mocks/SignatureBouncerMock.sol

This file was deleted.

12 changes: 12 additions & 0 deletions test/cryptography/ECDSA.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ contract('ECDSA', function ([_, other]) {
this.ecdsa = await ECDSAMock.new();
});

context('recover with invalid signature', function () {
it('with short signature', async function () {
expect(await this.ecdsa.recover(TEST_MESSAGE, '0x1234')).to.equal(ZERO_ADDRESS);
});

it('with long signature', async function () {
// eslint-disable-next-line max-len
expect(await this.ecdsa.recover(TEST_MESSAGE, '0x01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789'))
.to.equal(ZERO_ADDRESS);
});
});

context('recover with valid signature', function () {
context('with v0 signature', function () {
// Signature generated outside ganache with method web3.eth.sign(signer, message)
Expand Down
223 changes: 0 additions & 223 deletions test/drafts/SignatureBouncer.test.js

This file was deleted.

0 comments on commit 226c6bd

Please sign in to comment.