Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bot/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const waitPayment = async (ctx: MainContext, bot: HasTelegram, buyer: UserDocume
fiatAmount: order.fiat_amount,
});
const amount = Math.floor(order.amount + order.fee);
const { _request, hash, secret } = await createHoldInvoice({
const { hash, secret } = await createHoldInvoice({
amount,
description,
});
Expand Down
9 changes: 4 additions & 5 deletions bot/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ const invoicePaymentRequestMessage = async (
// We need the buyer rating
const stars = getEmojiRate(buyer.total_rating);
const roundedRating = decimalRound(buyer.total_rating, -1);
let rate = `${roundedRating} ${stars} (${buyer.total_reviews})`;
rate = sanitizeMD(rate);
const rate = `${roundedRating} ${stars} (${buyer.total_reviews})`;
// Extracting the buyer's days in the platform
const ageInDays = getUserAge(buyer);

Expand All @@ -89,7 +88,7 @@ const invoicePaymentRequestMessage = async (
days: ageInDays,
});

await ctx.telegram.sendMessage(user.tg_id, message, { parse_mode: 'MarkdownV2' });
await ctx.telegram.sendMessage(user.tg_id, message, { parse_mode: 'Markdown' });

await ctx.telegram.sendMessage(user.tg_id, order._id, {
reply_markup: {
Expand Down Expand Up @@ -125,7 +124,7 @@ const showQRCodeMessage = async (
type: 'photo',
media: { source: qrBytes },
caption: ['`', request, '`'].join(''),
parse_mode: 'MarkdownV2',
parse_mode: 'Markdown',
},
]);
} catch (error) {
Expand Down Expand Up @@ -154,7 +153,7 @@ const pendingSellMessage = async (ctx: MainContext, user: UserDocument, order: I
await ctx.telegram.sendMessage(
user.tg_id,
i18n.t('cancel_order_cmd', { orderId: order._id }),
{ parse_mode: 'MarkdownV2' }
{ parse_mode: 'Markdown' }
);

if (order.is_golden_honey_badger === true && order.type === 'sell') {
Expand Down