Only reset currentContextAddress if it was previously updated
This commit is contained in:
parent
d634775d40
commit
0ea3b10efd
@ -99,10 +99,11 @@ contract MixinTransactions is
|
||||
"FAILED_EXECUTION"
|
||||
);
|
||||
|
||||
// Reset current transaction signer
|
||||
// TODO: Check if gas is paid when currentContextAddress is already 0.
|
||||
// Reset current transaction signer if it was previously updated
|
||||
if (signerAddress != msg.sender) {
|
||||
currentContextAddress = address(0);
|
||||
}
|
||||
}
|
||||
|
||||
/// @dev Calculates EIP712 hash of the Transaction.
|
||||
/// @param salt Arbitrary number to ensure uniqueness of transaction hash.
|
||||
@ -120,6 +121,7 @@ contract MixinTransactions is
|
||||
{
|
||||
bytes32 schemaHash = EIP712_ZEROEX_TRANSACTION_SCHEMA_HASH;
|
||||
bytes32 dataHash = keccak256(data);
|
||||
|
||||
// Assembly for more efficiently computing:
|
||||
// keccak256(abi.encode(
|
||||
// EIP712_ZEROEX_TRANSACTION_SCHEMA_HASH,
|
||||
@ -127,6 +129,7 @@ contract MixinTransactions is
|
||||
// signerAddress,
|
||||
// keccak256(data)
|
||||
// ));
|
||||
|
||||
assembly {
|
||||
let memPtr := mload(64)
|
||||
mstore(memPtr, schemaHash)
|
||||
|
Loading…
x
Reference in New Issue
Block a user