diff --git a/contracts/WalletSimple.sol b/contracts/WalletSimple.sol index 44a4929..eb4960f 100644 --- a/contracts/WalletSimple.sol +++ b/contracts/WalletSimple.sol @@ -80,6 +80,7 @@ contract WalletSimple is IERC721Receiver, ERC1155Receiver { for (uint8 i = 0; i < allowedSigners.length; i++) { require(allowedSigners[i] != address(0), 'Invalid signer'); + require(!signers[allowedSigners[i]], 'Duplicate signer'); signers[allowedSigners[i]] = true; } diff --git a/test/gas.js b/test/gas.js index 3d9b56f..9ec3d33 100644 --- a/test/gas.js +++ b/test/gas.js @@ -67,7 +67,7 @@ describe(`Wallet Operations Gas Usage`, function () { accounts[1], accounts[2] ]); - checkGasUsed(171030, transaction.receipt.gasUsed); + checkGasUsed(172810, transaction.receipt.gasUsed); }); it('WalletSimple send [ @skip-on-coverage ]', async function () {