mirror of
https://github.com/pezkuwichain/pezkuwi-telegram-miniapp.git
synced 2026-04-22 03:07: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 ====================
|
// ==================== PROCESS BLOCKCHAIN TX ====================
|
||||||
|
|
||||||
// Get hot wallet private key
|
// Get hot wallet private key or mnemonic
|
||||||
const hotWalletPrivateKey = Deno.env.get('PLATFORM_PRIVATE_KEY');
|
const hotWalletPrivateKey =
|
||||||
|
Deno.env.get('PLATFORM_PRIVATE_KEY') || Deno.env.get('PLATFORM_WALLET_MNEMONIC');
|
||||||
|
|
||||||
if (!hotWalletPrivateKey) {
|
if (!hotWalletPrivateKey) {
|
||||||
// No private key configured — leave as pending for admin to process
|
// No private key/mnemonic configured — leave as pending for admin to process
|
||||||
console.warn('PLATFORM_PRIVATE_KEY not configured. Withdrawal left as pending.');
|
console.warn(
|
||||||
|
'Neither PLATFORM_PRIVATE_KEY nor PLATFORM_WALLET_MNEMONIC configured. Withdrawal left as pending.'
|
||||||
|
);
|
||||||
return new Response(
|
return new Response(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
success: true,
|
success: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user