function transferToken(
        BaseWallet _wallet, 
        address _token, 
        address _to, 
        uint256 _amount, 
        bytes _data
    ) 
        external 
        onlyOwnerOrModule(_wallet) 
        onlyWhenUnlocked(_wallet)
    {
        if(isWhitelisted(_wallet, _to)) {
            
            if(_token == ETH_TOKEN) {
                transferETH(_wallet, _to, _amount, _data);
            }
            
            else {
                transferERC20(_wallet, _token, _to, _amount, _data);
            }
        }
        else {
            if(_token == ETH_TOKEN) {
                
                if (checkAndUpdateDailySpent(_wallet, _amount)) {
                    transferETH(_wallet, _to, _amount, _data);
                }
                
                else {
                    addPendingTransfer(_wallet, ETH_TOKEN, _to, _amount, _data); 
                }
            }
            else {
                uint256 etherAmount = priceProvider.getEtherValue(_amount, _token);
                
                if (checkAndUpdateDailySpent(_wallet, etherAmount)) {
                    transferERC20(_wallet, _token, _to, _amount, _data);
                }
                
                else {
                    addPendingTransfer(_wallet, _token, _to, _amount, _data); 
                }
            }
        }
    }