Skip to content

Commit

Permalink
Revert "update hashMessage debug function"
Browse files Browse the repository at this point in the history
This reverts commit 6109ad8.
  • Loading branch information
mortelli authored and antomor committed Nov 28, 2022
1 parent ecc7f53 commit 3426a47
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
11 changes: 4 additions & 7 deletions contracts/factory/SmartWalletFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -109,21 +109,18 @@ contract SmartWalletFactory is ISmartWalletFactory {
return nonces[from];
}

function hashMessage(
address factory,
address owner,
function hashMessage(address owner,
address recoverer,
uint256 index,
string calldata prefix
bytes calldata sig
) external returns (bytes32){
bytes32 _hash = keccak256(abi.encodePacked(
factory,
address(this),
owner,
recoverer,
index
));
bytes32 r = keccak256(abi.encodePacked(prefix, _hash));
return r;
return _hash;
}

function createUserSmartWallet(
Expand Down
12 changes: 4 additions & 8 deletions types/truffle-contracts/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4978,35 +4978,31 @@ export interface SmartWalletFactoryInstance extends Truffle.ContractInstance {

hashMessage: {
(
factory: string | BN,
owner: string | BN,
recoverer: string | BN,
index: number | BN | string,
prefix: string,
sig: string,
txDetails?: Truffle.TransactionDetails
): Promise<Truffle.TransactionResponse>;
call(
factory: string | BN,
owner: string | BN,
recoverer: string | BN,
index: number | BN | string,
prefix: string,
sig: string,
txDetails?: Truffle.TransactionDetails
): Promise<string>;
sendTransaction(
factory: string | BN,
owner: string | BN,
recoverer: string | BN,
index: number | BN | string,
prefix: string,
sig: string,
txDetails?: Truffle.TransactionDetails
): Promise<string>;
estimateGas(
factory: string | BN,
owner: string | BN,
recoverer: string | BN,
index: number | BN | string,
prefix: string,
sig: string,
txDetails?: Truffle.TransactionDetails
): Promise<number>;
};
Expand Down

0 comments on commit 3426a47

Please sign in to comment.