public static object InsertTransaction(NpgsqlConnection conn, string id, bool createTransferRecord = false)
        {
            MWithdrawal withdrawal = new MWithdrawal();

            withdrawal = WithdrawalUtilities.GetWithdrawal(conn, id);
            Classes.Instbtc.Models.TransactionModel transaction = new Classes.Instbtc.Models.TransactionModel();

            if (withdrawal.transaction_currency == "BTC")
            {
                #region Transaction Object BTC Wds
                transaction = new Classes.Instbtc.Models.TransactionModel()
                {
                    Psp_ID            = 2,
                    Deposit_Currency  = "USD",
                    Deposit_Amount    = (decimal)withdrawal.UsdConversion * -1,
                    Exchange_Currency = "BTC",
                    Exchange_Amount   = withdrawal.Amount * -1,
                    Created_Date      = DateTime.UtcNow,
                    Client_ID         = withdrawal.UserId,
                    Psp_Status        = "Approved",
                    Credited_Status   = "Credited",
                    type = TransactionType.WITHDRAWAL,
                    Transaction_Currency = withdrawal.transaction_currency
                };
                #endregion
            }

            else if (withdrawal.transaction_currency == "EUR")
            {
                #region Transaction Object BTC Wds
                transaction = new Classes.Instbtc.Models.TransactionModel()
                {
                    Psp_ID            = 2,
                    Deposit_Currency  = "EUR",
                    Deposit_Amount    = withdrawal.Amount * -1,
                    Exchange_Currency = "EUR",
                    Exchange_Amount   = withdrawal.Amount * -1,
                    Created_Date      = DateTime.UtcNow,
                    Client_ID         = withdrawal.UserId,
                    Psp_Status        = "Approved",
                    Credited_Status   = "Credited",
                    type = TransactionType.WITHDRAWAL,
                    Transaction_Currency = withdrawal.transaction_currency
                };
                #endregion
            }

            object res;

            if (createTransferRecord is false)
            {
                res = Classes.Instbtc.Create.Transactions.CreateTransaction(transaction);
            }
            else
            {
                res = Classes.Instbtc.Create.Transactions.CreateTransaction(transaction);

                if (res.ToString() != "Internal Error" && !string.IsNullOrEmpty(res.ToString()))
                {
                    bool isCreateTransferSuccess = TransferUtility.CreateTransfer((int)res, transaction);
                    if (isCreateTransferSuccess)
                    {
                        return(res);
                    }
                    else
                    {
                        res = "Error";
                    }
                }
            }

            return(res);
        }