From b1d815128b0dc654484eb10be769f0c7d6072025 Mon Sep 17 00:00:00 2001 From: bernd2022 <104787072+bernd2022@users.noreply.github.com> Date: Tue, 3 Mar 2026 13:18:08 +0100 Subject: [PATCH] fix: skip outgoing transfers when scanning ICP native deposits (#3335) Rosetta /search/transactions returns all transactions for an address, including outgoing ones. Forward transactions from the deposit address to the DEX wallet were incorrectly registered as new deposits. Only accept incoming transfers where transfer.to === deposit address. --- .../supporting/payin/strategies/register/impl/icp.strategy.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/subdomains/supporting/payin/strategies/register/impl/icp.strategy.ts b/src/subdomains/supporting/payin/strategies/register/impl/icp.strategy.ts index 31f1a70e3c..07b5eac0d1 100644 --- a/src/subdomains/supporting/payin/strategies/register/impl/icp.strategy.ts +++ b/src/subdomains/supporting/payin/strategies/register/impl/icp.strategy.ts @@ -78,7 +78,6 @@ export class InternetComputerStrategy extends RegisterStrategy { fromBlock?: number, toBlock?: number, ): Promise { - const ownAccountId = InternetComputerUtil.accountIdentifier(this.payInInternetComputerService.getWalletAddress()); const asset = await this.assetService.getNativeAsset(this.blockchain); const entries: PayInEntry[] = []; @@ -93,7 +92,7 @@ export class InternetComputerStrategy extends RegisterStrategy { for (const transfer of transfers) { if (transfer.blockIndex < lastBlock) continue; if (toBlock !== undefined && transfer.blockIndex > toBlock) continue; - if (transfer.from === ownAccountId) continue; + if (transfer.to !== accountId) continue; entries.push({ senderAddresses: transfer.from,