diff --git a/src/services/admin/refund-failed-session.js b/src/services/admin/refund-failed-session.js index eeb26d3..4243ac4 100644 --- a/src/services/admin/refund-failed-session.js +++ b/src/services/admin/refund-failed-session.js @@ -88,9 +88,8 @@ export async function refundFailedSession(req, res) { const wallet = new ethers.Wallet(process.env.PAYMENTS_PRIVATE_KEY, provider); - // Refund 69.1% of the transaction amount. This approximates the mint cost to - // a fraction of a cent. - const refundAmount = tx.value.mul(691).div(1000); + // Refund 50% of the transaction amount. This approximates the mint cost. + const refundAmount = tx.value.mul(5).div(10); // Ensure wallet has enough funds to refund const balance = await wallet.getBalance(); diff --git a/src/utils/transactions.js b/src/utils/transactions.js index ed02097..ba821b1 100644 --- a/src/utils/transactions.js +++ b/src/utils/transactions.js @@ -146,9 +146,8 @@ async function refundMintFeeOnChain(session, to) { const wallet = new ethers.Wallet(process.env.PAYMENTS_PRIVATE_KEY, provider); - // Refund 69.1% of the transaction amount. This approximates the mint cost to - // a fraction of a cent. - const refundAmount = tx.value.mul(691).div(1000); + // Refund 50% of the transaction amount. This approximates the mint cost. + const refundAmount = tx.value.mul(5).div(10); // Ensure wallet has enough funds to refund const balance = await wallet.getBalance();