fix: add amount param to ChangeNOW URL
This commit is contained in:
@@ -130,21 +130,22 @@ export default class DepositHandler {
|
|||||||
|
|
||||||
const changenowTo = CHANGENOW_CRYPTO_MAP[walletType] || walletType.toLowerCase();
|
const changenowTo = CHANGENOW_CRYPTO_MAP[walletType] || walletType.toLowerCase();
|
||||||
const refId = config.CHANGENOW_REF;
|
const refId = config.CHANGENOW_REF;
|
||||||
const changenowUrl = `https://changenow.io/exchange?from=eur&to=${changenowTo}&fiatMode=true${refId ? `&ref_id=${refId}` : ''}`;
|
const changenowUrl = `https://changenow.io/exchange?from=eur&to=${changenowTo}&fiatMode=true&amount=${amount}${refId ? `&ref_id=${refId}` : ''}`;
|
||||||
|
|
||||||
let message = `💳 *Deposit ${walletType}*\n\n`;
|
let message = `💳 *Deposit ${walletType} — €${amount}*\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 ChangeNOW" button\n`;
|
message += `2\\. Click "Open ChangeNOW" button\n`;
|
||||||
message += `3\\. Enter the amount and complete the payment\n`;
|
message += `3\\. The amount is pre\\-filled: €${amount} → ${walletType}\n`;
|
||||||
message += `4\\. Paste your wallet address as the receiving address\n\n`;
|
message += `4\\. Complete the payment on ChangeNOW\n`;
|
||||||
|
message += `5\\. Paste your wallet address as the receiving address\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 ChangeNOW — EUR → ${walletType}`, url: changenowUrl }],
|
[{ text: `🌐 Open ChangeNOW — €${amount} → ${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}` }
|
||||||
|
|||||||
Reference in New Issue
Block a user