diff --git a/solidity/src/contracts/Adapter.sol b/solidity/src/contracts/Adapter.sol index c1b44d4..73e7111 100644 --- a/solidity/src/contracts/Adapter.sol +++ b/solidity/src/contracts/Adapter.sol @@ -66,8 +66,7 @@ contract Adapter is IAdapter, Ownable, ReentrancyGuard { Operation memory operation, IPAM.Metadata calldata metadata ) external nonReentrant { - if (operation.erc20 != erc20) - revert InvalidOperation(); + if (operation.erc20 != erc20) revert InvalidOperation(); (bool isAuthorized, bytes32 eventId) = IPAM(pam).isAuthorized( operation, diff --git a/solidity/src/contracts/PAM.sol b/solidity/src/contracts/PAM.sol index f5dbd85..642ffa1 100644 --- a/solidity/src/contracts/PAM.sol +++ b/solidity/src/contracts/PAM.sol @@ -153,7 +153,7 @@ contract PAM is Ownable, IPAM { address recipient = _bytesToAddress( content[offset:offset += recipientLen] ); - + bytes memory data = content[offset:]; return (nonce == operation.nonce && diff --git a/solidity/test/forge/DeployHelper.sol b/solidity/test/forge/DeployHelper.sol index 1bae0f9..06de8b7 100644 --- a/solidity/test/forge/DeployHelper.sol +++ b/solidity/test/forge/DeployHelper.sol @@ -44,7 +44,11 @@ contract DeployHelper { XERC20Lockbox lockbox; if (local) { lockbox = XERC20Lockbox( - factory.deployLockbox(address(xerc20), address(uint160(uint256(erc20))), isNative) + factory.deployLockbox( + address(xerc20), + address(uint160(uint256(erc20))), + isNative + ) ); } diff --git a/solidity/test/hardhat/Adapter.test.js b/solidity/test/hardhat/Adapter.test.js index 45e0478..9e99b6a 100644 --- a/solidity/test/hardhat/Adapter.test.js +++ b/solidity/test/hardhat/Adapter.test.js @@ -153,8 +153,7 @@ const deployERC1820 = () => setCode(ERC1820, ERC1820BYTES) value: amount, }, ) - } - else { + } else { await erc20.connect(user).approve(adapter, amount) tx = adapter.swap( erc20.target,