diff --git a/src/TokenFlow.sol b/src/TokenFlow.sol index 91eaeaa..7a25cdc 100644 --- a/src/TokenFlow.sol +++ b/src/TokenFlow.sol @@ -52,9 +52,10 @@ contract TokenFlow is ITokenFlow { /// @inheritdoc ITokenFlow function moveOut(address token, uint128 amount) external requireScope(INTERNAL_SCOPE) { - TransientNetflows.add(token, int256(uint256(amount))); - + uint balanceBefore = token.balanceOf(payer); token.safeTransferFrom(msg.sender, payer, amount); + uint received = token.balanceOf(payer) - balanceBefore; + TransientNetflows.add(token, int256(uint256(received))); } /// @inheritdoc ITokenFlow