From 535498acfa87fb0b7d48ca0ae3a84362310c7151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Jos=C3=A9=20Ram=C3=ADrez?= Date: Tue, 7 Oct 2025 18:54:45 -0300 Subject: [PATCH 1/2] feat: add receipt for send link --- src/utils/history.utils.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/utils/history.utils.ts b/src/utils/history.utils.ts index fc813eb13..6208fbe18 100644 --- a/src/utils/history.utils.ts +++ b/src/utils/history.utils.ts @@ -128,21 +128,20 @@ export function isFinalState(transaction: Pick): boolean } export function getReceiptUrl(transaction: TransactionDetails): string | undefined { - if (transaction.extraDataForDrawer?.link) { - return transaction.extraDataForDrawer.link - } - if (!transaction.extraDataForDrawer?.originalType) { - return - } - const isManteca = [ + const hasReceiptPage = transaction.extraDataForDrawer?.originalType && [ EHistoryEntryType.MANTECA_QR_PAYMENT, EHistoryEntryType.MANTECA_OFFRAMP, EHistoryEntryType.MANTECA_ONRAMP, + EHistoryEntryType.SEND_LINK, ].includes(transaction.extraDataForDrawer.originalType) - if (isManteca) { - const typeId = historyTypeToNumber(transaction.extraDataForDrawer.originalType) + if (hasReceiptPage) { + const typeId = historyTypeToNumber(transaction.extraDataForDrawer!.originalType) return `${BASE_URL}/receipt/${transaction.id}?t=${typeId}` } + + if (transaction.extraDataForDrawer?.link) { + return transaction.extraDataForDrawer.link + } } export function getAvatarUrl(transaction: TransactionDetails): string | undefined { From 6f7b923f3496e89099238f2c30e4bfec337450e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Jos=C3=A9=20Ram=C3=ADrez?= Date: Wed, 8 Oct 2025 17:23:27 -0300 Subject: [PATCH 2/2] fix: formatting --- src/utils/history.utils.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/utils/history.utils.ts b/src/utils/history.utils.ts index 6208fbe18..c2d0d8527 100644 --- a/src/utils/history.utils.ts +++ b/src/utils/history.utils.ts @@ -128,12 +128,14 @@ export function isFinalState(transaction: Pick): boolean } export function getReceiptUrl(transaction: TransactionDetails): string | undefined { - const hasReceiptPage = transaction.extraDataForDrawer?.originalType && [ - EHistoryEntryType.MANTECA_QR_PAYMENT, - EHistoryEntryType.MANTECA_OFFRAMP, - EHistoryEntryType.MANTECA_ONRAMP, - EHistoryEntryType.SEND_LINK, - ].includes(transaction.extraDataForDrawer.originalType) + const hasReceiptPage = + transaction.extraDataForDrawer?.originalType && + [ + EHistoryEntryType.MANTECA_QR_PAYMENT, + EHistoryEntryType.MANTECA_OFFRAMP, + EHistoryEntryType.MANTECA_ONRAMP, + EHistoryEntryType.SEND_LINK, + ].includes(transaction.extraDataForDrawer.originalType) if (hasReceiptPage) { const typeId = historyTypeToNumber(transaction.extraDataForDrawer!.originalType) return `${BASE_URL}/receipt/${transaction.id}?t=${typeId}`