mirror of
https://github.com/pezkuwichain/pezkuwi-telegram-miniapp.git
synced 2026-04-21 23:37:55 +00:00
fix: fallback to PLATFORM_WALLET_MNEMONIC for withdraw TX
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user