<?php
session_start();

header("Access-Control-Allow-Origin: https://enerliths.com");
header("Access-Control-Allow-Credentials: true");
header("Access-Control-Allow-Headers: Content-Type");
header("Access-Control-Allow-Methods: POST, OPTIONS");
header("Content-Type: application/json");

if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
    http_response_code(200);
    exit();
}
require_once "../config/db.php";

$deposit_id = $_GET["deposit_id"];

$stmt = $conn->prepare("
SELECT status FROM crypto_deposits
WHERE id=?
");

$stmt->bind_param("i",$deposit_id);
$stmt->execute();

$res = $stmt->get_result()->fetch_assoc();

echo json_encode($res);