Pārlūkot izejas kodu

removed unnecessary require and renaming of null to zero (#1717)

* removed unnecessary require

* build pipeline fix

* kept as it is

* Added require
Prince Sinha 6 gadi atpakaļ
vecāks
revīzija
963f1eb35b
2 mainītis faili ar 7 papildinājumiem un 7 dzēšanām
  1. 6 6
      test/token/ERC20/ERC20.test.js
  2. 1 1
      test/token/ERC721/ERC721.test.js

+ 6 - 6
test/token/ERC20/ERC20.test.js

@@ -323,11 +323,11 @@ contract('ERC20', function ([_, initialHolder, recipient, anotherAccount]) {
   describe('_mint', function () {
     const amount = new BN(50);
 
-    it('rejects a null account', async function () {
+    it('rejects a zero account', async function () {
       await shouldFail.reverting(this.token.mint(ZERO_ADDRESS, amount));
     });
 
-    describe('for a non null account', function () {
+    describe('for a non zero account', function () {
       beforeEach('minting', async function () {
         const { logs } = await this.token.mint(recipient, amount);
         this.logs = logs;
@@ -354,11 +354,11 @@ contract('ERC20', function ([_, initialHolder, recipient, anotherAccount]) {
   });
 
   describe('_burn', function () {
-    it('rejects a null account', async function () {
+    it('rejects a zero account', async function () {
       await shouldFail.reverting(this.token.burn(ZERO_ADDRESS, new BN(1)));
     });
 
-    describe('for a non null account', function () {
+    describe('for a non zero account', function () {
       it('rejects burning more than balance', async function () {
         await shouldFail.reverting(this.token.burn(initialHolder, initialSupply.addn(1)));
       });
@@ -405,11 +405,11 @@ contract('ERC20', function ([_, initialHolder, recipient, anotherAccount]) {
       await this.token.approve(spender, allowance, { from: initialHolder });
     });
 
-    it('rejects a null account', async function () {
+    it('rejects a zero account', async function () {
       await shouldFail.reverting(this.token.burnFrom(ZERO_ADDRESS, new BN(1)));
     });
 
-    describe('for a non null account', function () {
+    describe('for a non zero account', function () {
       it('rejects burning more than allowance', async function () {
         await shouldFail.reverting(this.token.burnFrom(initialHolder, allowance.addn(1)));
       });

+ 1 - 1
test/token/ERC721/ERC721.test.js

@@ -15,7 +15,7 @@ contract('ERC721', function ([_, creator, tokenOwner, other, ...accounts]) {
     const tokenId = new BN('5042');
 
     describe('_mint(address, uint256)', function () {
-      it('reverts with a null destination address', async function () {
+      it('reverts with a zero destination address', async function () {
         await shouldFail.reverting(this.token.mint(ZERO_ADDRESS, tokenId));
       });