Remove Address.toPayable (#2133)
* Remove Address.toPayable * Add changelog entry
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user