Skip to content

Commit

Permalink
add signer address validation
Browse files Browse the repository at this point in the history
  • Loading branch information
gianchandania committed Jan 23, 2024
1 parent 165b4be commit 8111aea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions contracts/WalletSimple.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion test/gas.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down

0 comments on commit 8111aea

Please sign in to comment.