fix: replace StealthEX with ChangeNOW for wallet deposits
- URL: https://changenow.io/exchange?from=eur&to={crypto}&fiatMode=true - Removed amount selection from URL (ChangeNOW has it in UI) - Renamed STEALTHEX_REF to CHANGENOW_REF in config - Updated all UI labels from StealthEX to ChangeNOW
This commit is contained in:
@@ -29,9 +29,9 @@ COMMISSION_WALLET_USDT=
|
|||||||
COMMISSION_WALLET_USDC=
|
COMMISSION_WALLET_USDC=
|
||||||
COMMISSION_WALLET_ETH=
|
COMMISSION_WALLET_ETH=
|
||||||
|
|
||||||
# --- StealthEX Deposit Integration ---
|
# --- ChangeNOW Deposit Integration ---
|
||||||
# Optional: your StealthEX referral ID (leave empty if none)
|
# Optional: your ChangeNOW referral ID (leave empty if none)
|
||||||
STEALTHEX_REF=
|
CHANGENOW_REF=
|
||||||
|
|
||||||
# --- WireGuard ---
|
# --- WireGuard ---
|
||||||
WG_ENABLED=false
|
WG_ENABLED=false
|
||||||
|
|||||||
@@ -44,5 +44,5 @@ export default {
|
|||||||
ETH: process.env.COMMISSION_WALLET_ETH
|
ETH: process.env.COMMISSION_WALLET_ETH
|
||||||
},
|
},
|
||||||
|
|
||||||
STEALTHEX_REF: process.env.STEALTHEX_REF || ''
|
CHANGENOW_REF: process.env.CHANGENOW_REF || ''
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { editOrSendCallback } from '../../../utils/messageUtils.js';
|
|||||||
|
|
||||||
const DEPOSIT_AMOUNTS = [25, 50, 100, 250, 500];
|
const DEPOSIT_AMOUNTS = [25, 50, 100, 250, 500];
|
||||||
|
|
||||||
const STEALTHEX_CRYPTO_MAP = {
|
const CHANGENOW_CRYPTO_MAP = {
|
||||||
BTC: 'btc',
|
BTC: 'btc',
|
||||||
ETH: 'eth',
|
ETH: 'eth',
|
||||||
LTC: 'ltc',
|
LTC: 'ltc',
|
||||||
@@ -68,7 +68,7 @@ export default class DepositHandler {
|
|||||||
walletButtons.push([{ text: '« Back', callback_data: 'back_to_balance' }]);
|
walletButtons.push([{ text: '« Back', callback_data: 'back_to_balance' }]);
|
||||||
|
|
||||||
await bot.editMessageText(
|
await bot.editMessageText(
|
||||||
'💳 *Deposit via StealthEX*\n\nSelect the wallet you want to top up:',
|
'💳 *Deposit via ChangeNOW*\n\nSelect the wallet you want to top up:',
|
||||||
{
|
{
|
||||||
chat_id: chatId,
|
chat_id: chatId,
|
||||||
message_id: callbackQuery.message.message_id,
|
message_id: callbackQuery.message.message_id,
|
||||||
@@ -128,25 +128,23 @@ export default class DepositHandler {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const stealthexFrom = 'eur';
|
const changenowTo = CHANGENOW_CRYPTO_MAP[walletType] || walletType.toLowerCase();
|
||||||
const stealthexTo = STEALTHEX_CRYPTO_MAP[walletType] || walletType.toLowerCase();
|
const refId = config.CHANGENOW_REF;
|
||||||
const refId = config.STEALTHEX_REF;
|
const changenowUrl = `https://changenow.io/exchange?from=eur&to=${changenowTo}&fiatMode=true${refId ? `&ref_id=${refId}` : ''}`;
|
||||||
const stealthexUrl = `https://stealthex.io/exchange/new/?amount=${amount}&from=${stealthexFrom}&to=${stealthexTo}${refId ? `&ref_id=${refId}` : ''}`;
|
|
||||||
|
|
||||||
let message = `💳 *Deposit ${walletType} — $${amount}*\n\n`;
|
let message = `💳 *Deposit ${walletType}*\n\n`;
|
||||||
message += `📋 *Instructions:*\n`;
|
message += `📋 *Instructions:*\n`;
|
||||||
message += `1\\. Copy your wallet address below\n`;
|
message += `1\\. Copy your wallet address below\n`;
|
||||||
message += `2\\. Click "Open StealthEX" button\n`;
|
message += `2\\. Click "Open ChangeNOW" button\n`;
|
||||||
message += `3\\. The exchange is pre\\-configured: EUR → ${walletType}, $${amount}\n`;
|
message += `3\\. Enter the amount and complete the payment\n`;
|
||||||
message += `4\\. Complete the payment on StealthEX\n`;
|
message += `4\\. Paste your wallet address as the receiving address\n\n`;
|
||||||
message += `5\\. Paste your wallet address as the receiving address in StealthEX\n\n`;
|
|
||||||
message += `🔐 *Your ${walletType} Wallet Address:*\n`;
|
message += `🔐 *Your ${walletType} Wallet Address:*\n`;
|
||||||
message += `\`${wallet.address}\`\n\n`;
|
message += `\`${wallet.address}\`\n\n`;
|
||||||
message += `⚠️ *Important:* Always double\\-check the wallet address before confirming\\.`;
|
message += `⚠️ *Important:* Always double\\-check the wallet address before confirming\\.`;
|
||||||
|
|
||||||
const keyboard = {
|
const keyboard = {
|
||||||
inline_keyboard: [
|
inline_keyboard: [
|
||||||
[{ text: `🌐 Open StealthEX — EUR → ${walletType} ($${amount})`, url: stealthexUrl }],
|
[{ text: `🌐 Open ChangeNOW — EUR → ${walletType}`, url: changenowUrl }],
|
||||||
[
|
[
|
||||||
{ text: '📋 Copy Address', callback_data: `deposit_copy_${walletType}` },
|
{ text: '📋 Copy Address', callback_data: `deposit_copy_${walletType}` },
|
||||||
{ text: '🔄 Change Amount', callback_data: `deposit_wallet_${walletType}` }
|
{ text: '🔄 Change Amount', callback_data: `deposit_wallet_${walletType}` }
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ export default class TopUpHandler {
|
|||||||
|
|
||||||
const keyboard = {
|
const keyboard = {
|
||||||
inline_keyboard: [
|
inline_keyboard: [
|
||||||
[{ text: '💳 Deposit via StealthEX', callback_data: 'deposit_select_wallet' }],
|
[{ text: '💳 Deposit via ChangeNOW', callback_data: 'deposit_select_wallet' }],
|
||||||
...walletButtons,
|
...walletButtons,
|
||||||
[{ text: '« Back', callback_data: 'back_to_balance' }]
|
[{ text: '« Back', callback_data: 'back_to_balance' }]
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user