From e59ebb3d9191a3befcd256422229eda367b12d7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=84kwav?= Date: Sun, 29 Dec 2024 19:31:53 +0100 Subject: [PATCH] move license display check in front of transfer --- .../TransactionHistory/TransactionHistory.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/AccountDetails/TransactionHistory/TransactionHistory.tsx b/components/AccountDetails/TransactionHistory/TransactionHistory.tsx index 82cc6d4d..318a4d8d 100644 --- a/components/AccountDetails/TransactionHistory/TransactionHistory.tsx +++ b/components/AccountDetails/TransactionHistory/TransactionHistory.tsx @@ -33,6 +33,10 @@ function TransactionHistory() { ) } + if (transaction.reference.startsWith('license-')) { + const licenseparts = transaction.reference.split('-') + return `Transfer (License ${licenseparts[1]} for ${licenseparts[2]})` + } if (transaction.productId === 'transfer') { return 'CoflCoins-Transfer' } @@ -66,10 +70,6 @@ function TransactionHistory() { if (parts.length === 2 && /^[0-9a-fA-F]{32}$/.test(parts[0]) && /^[0-9a-fA-F\-]{1,}$/.test(parts[1])) { suffix = ` (License for ${parts[0]})` } - if (transaction.reference.startsWith('license-')) { - const licenseparts = transaction.reference.split('-') - suffix = ` (License ${licenseparts[1]} for ${licenseparts[2]})` - } let purchasedPremiumOption PREMIUM_TYPES.forEach(premiumType => {