Skip to content

Commit

Permalink
Merge pull request #11 from Once-Upon/benguyen0214/ou-1145-should-use…
Browse files Browse the repository at this point in the history
…-a-different-category-for-token-airdrop-and-token
  • Loading branch information
pcowgill authored Nov 30, 2023
2 parents 1ebc940 + 9587a54 commit 75bccae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/heuristics/tokenAirdrop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ function generateTokenAirdropContext(transaction: Transaction): Transaction {
value: firstAssetTransfer.value,
};

const category =
firstAssetTransfer.type === 'erc721' ? 'NFT' : 'FUNGIBLE_TOKEN';

transaction.context = {
variables: {
recipient:
Expand Down Expand Up @@ -103,7 +106,7 @@ function generateTokenAirdropContext(transaction: Transaction): Transaction {
},
},
summaries: {
category: 'FUNGIBLE_TOKEN',
category,
en: {
title: 'Token Airdrop',
default: `[[recipient]] [[receivedAirdrop]] [[token]]${
Expand Down

0 comments on commit 75bccae

Please sign in to comment.