From 9587a5458ebe80f809b30751d728ce335d0148ad Mon Sep 17 00:00:00 2001 From: ponyjackal Date: Thu, 30 Nov 2023 03:32:05 -0800 Subject: [PATCH] feat: have different categories for tokenAirdrop --- src/heuristics/tokenAirdrop.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/heuristics/tokenAirdrop.ts b/src/heuristics/tokenAirdrop.ts index e71b8936..6f726364 100644 --- a/src/heuristics/tokenAirdrop.ts +++ b/src/heuristics/tokenAirdrop.ts @@ -67,6 +67,9 @@ function generateTokenAirdropContext(transaction: Transaction): Transaction { value: firstAssetTransfer.value, }; + const category = + firstAssetTransfer.type === 'erc721' ? 'NFT' : 'FUNGIBLE_TOKEN'; + transaction.context = { variables: { recipient: @@ -103,7 +106,7 @@ function generateTokenAirdropContext(transaction: Transaction): Transaction { }, }, summaries: { - category: 'FUNGIBLE_TOKEN', + category, en: { title: 'Token Airdrop', default: `[[recipient]] [[receivedAirdrop]] [[token]]${