Function: withdrawERC20(address _token, uint256 _amount)
This withdraws ERC-20--based tokens from the virtual account to the sender. Can only be called by the approved caller.
Inputs
_token
Control: Full control.
Constraints: None, but it reverts later if the address is not a valid ERC-20 token.
Impact: The address of the ERC-20 token to withdraw.
_amount
Control: Full control.
Constraints: None, but it reverts later if more than the current token balance.
Impact: The amount of ERC-20 tokens to withdraw.
Branches and code coverage
Intended branches
Approved caller can withdraw.
Negative behavior
Unapproved caller cannot withdraw.