From 5bfa44971a194e496f4be801b8b973e79d96f452 Mon Sep 17 00:00:00 2001 From: Vedal Date: Tue, 11 Jun 2024 21:38:10 +0100 Subject: [PATCH] Show returned text on successful transaction --- ebs/src/modules/transactions.ts | 2 +- frontend/www/src/modules/auth.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ebs/src/modules/transactions.ts b/ebs/src/modules/transactions.ts index faecdad..5e83e39 100644 --- a/ebs/src/modules/transactions.ts +++ b/ebs/src/modules/transactions.ts @@ -243,7 +243,7 @@ app.post("/public/transaction", async (req, res) => { connection.redeem(redeem, cart, userInfo, transaction.token); } - res.sendStatus(200); + res.sendStatus(200).send("Your transaction was successful! Your redeem will appear on stream soon."); }); app.post("/public/transaction/cancel", async (req, res) => { diff --git a/frontend/www/src/modules/auth.ts b/frontend/www/src/modules/auth.ts index 401ea1e..fdd4862 100644 --- a/frontend/www/src/modules/auth.ts +++ b/frontend/www/src/modules/auth.ts @@ -67,7 +67,7 @@ Twitch.ext.bits.onTransactionComplete(async (transaction) => { if (result.ok) { // Transaction token can no longer be used to log - showSuccessModal("Purchase completed", `Your transaction was successful! Your redeem will appear on stream soon.\nTransaction ID: ${transactionToken}`); + showSuccessModal("Purchase completed", `${await result.text()}\nTransaction ID: ${transactionToken}`); } else { logToDiscord({ transactionToken: transactionToken,