From 8c36b832b8d48465b99f7a6a553295c88ac76235 Mon Sep 17 00:00:00 2001 From: Kurdistan Tech Ministry Date: Fri, 27 Feb 2026 01:17:01 +0300 Subject: [PATCH] fix: fallback to PLATFORM_WALLET_MNEMONIC for withdraw TX --- supabase/functions/request-withdraw-telegram/index.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/supabase/functions/request-withdraw-telegram/index.ts b/supabase/functions/request-withdraw-telegram/index.ts index 8c61894..ff17c3f 100644 --- a/supabase/functions/request-withdraw-telegram/index.ts +++ b/supabase/functions/request-withdraw-telegram/index.ts @@ -399,12 +399,15 @@ serve(async (req) => { // ==================== PROCESS BLOCKCHAIN TX ==================== - // Get hot wallet private key - const hotWalletPrivateKey = Deno.env.get('PLATFORM_PRIVATE_KEY'); + // Get hot wallet private key or mnemonic + const hotWalletPrivateKey = + Deno.env.get('PLATFORM_PRIVATE_KEY') || Deno.env.get('PLATFORM_WALLET_MNEMONIC'); if (!hotWalletPrivateKey) { - // No private key configured — leave as pending for admin to process - console.warn('PLATFORM_PRIVATE_KEY not configured. Withdrawal left as pending.'); + // No private key/mnemonic configured — leave as pending for admin to process + console.warn( + 'Neither PLATFORM_PRIVATE_KEY nor PLATFORM_WALLET_MNEMONIC configured. Withdrawal left as pending.' + ); return new Response( JSON.stringify({ success: true,