From 13a9d3a8a67bca9efeaad1cbc1c4e964425d632c Mon Sep 17 00:00:00 2001 From: TZGyn Date: Sun, 24 May 2026 05:00:47 +0800 Subject: [PATCH] Fix swap detection: include internal category as native transfers --- apps/desktop/src/bun/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/desktop/src/bun/index.ts b/apps/desktop/src/bun/index.ts index 0b2ac72..1e7a963 100644 --- a/apps/desktop/src/bun/index.ts +++ b/apps/desktop/src/bun/index.ts @@ -226,17 +226,17 @@ async function pairTransfers( const combined: TxEntry[] = [] for (const [, group] of byHash) { - const external = group.filter( - (t: any) => t.category === 'external', + const native = group.filter( + (t: any) => t.category === 'external' || t.category === 'internal', ) const tokens = group.filter( (t: any) => t.category === 'erc20', ) - const extOut = external.filter( + const extOut = native.filter( (t: any) => t.from?.toLowerCase() === addrLower, ) - const extIn = external.filter( + const extIn = native.filter( (t: any) => t.to?.toLowerCase() === addrLower, ) const tokIn = tokens.filter(