Remove Address.toPayable (#2133)

* Remove Address.toPayable

* Add changelog entry
This commit is contained in:
Nicolás Venturo
2020-03-16 18:22:02 -03:00
committed by GitHub
parent eb34ae67ff
commit 9975a1a0c2
4 changed files with 2 additions and 31 deletions

View File

@ -1,6 +1,6 @@
const { accounts, contract } = require('@openzeppelin/test-environment');
const { balance, constants, ether, expectRevert, send } = require('@openzeppelin/test-helpers');
const { balance, ether, expectRevert, send } = require('@openzeppelin/test-helpers');
const { expect } = require('chai');
const AddressImpl = contract.fromArtifact('AddressImpl');
@ -9,8 +9,6 @@ const EtherReceiver = contract.fromArtifact('EtherReceiverMock');
describe('Address', function () {
const [ recipient, other ] = accounts;
const ALL_ONES_ADDRESS = '0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF';
beforeEach(async function () {
this.mock = await AddressImpl.new();
});
@ -26,20 +24,6 @@ describe('Address', function () {
});
});
describe('toPayable', function () {
it('should return a payable address when the account is the zero address', async function () {
expect(await this.mock.toPayable(constants.ZERO_ADDRESS)).to.equal(constants.ZERO_ADDRESS);
});
it('should return a payable address when the account is an arbitrary address', async function () {
expect(await this.mock.toPayable(other)).to.equal(other);
});
it('should return a payable address when the account is the all ones address', async function () {
expect(await this.mock.toPayable(ALL_ONES_ADDRESS)).to.equal(ALL_ONES_ADDRESS);
});
});
describe('sendValue', function () {
beforeEach(async function () {
this.recipientTracker = await balance.tracker(recipient);