@@ -97,7 +97,7 @@ contract AsyncSwap is BaseHook, IAsyncSwapAMM {
9797
9898 function asyncOrderAmount (PoolId poolId , address user , bool zeroForOne ) external view returns (uint256 claimable ) {
9999 AsyncFiller.State storage state = asyncOrders[poolId];
100- return state.asyncOrder [user][zeroForOne];
100+ return state.asyncOrderAmount [user][zeroForOne];
101101 }
102102
103103 function isExecutor (PoolId poolId , address user , address executor ) external view returns (bool ) {
@@ -138,7 +138,7 @@ contract AsyncSwap is BaseHook, IAsyncSwapAMM {
138138
139139 /// TODO: Document what this does
140140 uint256 amountToFill = uint256 (amountIn);
141- uint256 claimableAmount = asyncOrders[poolId].asyncOrder [owner][zeroForOne];
141+ uint256 claimableAmount = asyncOrders[poolId].asyncOrderAmount [owner][zeroForOne];
142142 require (amountToFill <= claimableAmount, "Max fill order limit exceed " );
143143 AsyncFiller.State storage state = asyncOrders[poolId];
144144 require (order.isExecutor (state, msg .sender ), "Caller is valid not excutor " );
@@ -154,7 +154,7 @@ contract AsyncSwap is BaseHook, IAsyncSwapAMM {
154154 currencyFill = currency0;
155155 }
156156
157- asyncOrders[poolId].asyncOrder [owner][zeroForOne] -= amountToFill;
157+ asyncOrders[poolId].asyncOrderAmount [owner][zeroForOne] -= amountToFill;
158158 /// TODO: check if this is needed, we could just burn
159159 poolManager.transfer (owner, currencyTake.toId (), amountToFill);
160160 emit AsyncOrderFilled (poolId, owner, zeroForOne, amountToFill);
@@ -195,8 +195,8 @@ contract AsyncSwap is BaseHook, IAsyncSwapAMM {
195195
196196 /// @dev Issue 1:1 claimableAmount - pool fee to user
197197 /// @dev Add amount taken to previous claimableAmount
198- uint256 currClaimables = asyncOrders[poolId].asyncOrder [hookData.user][params.zeroForOne];
199- asyncOrders[poolId].asyncOrder [hookData.user][params.zeroForOne] = currClaimables + finalTaken;
198+ uint256 currClaimables = asyncOrders[poolId].asyncOrderAmount [hookData.user][params.zeroForOne];
199+ asyncOrders[poolId].asyncOrderAmount [hookData.user][params.zeroForOne] = currClaimables + finalTaken;
200200
201201 /// @dev Hook event
202202 /// @reference
0 commit comments