Skip to content

Commit 70c567a

Browse files
authored
revert sol tx filter solution (#4256)
1 parent b190fb8 commit 70c567a

File tree

1 file changed

+5
-17
lines changed
  • backend/native/backpack-api/src/routes/graphql/clients

1 file changed

+5
-17
lines changed

backend/native/backpack-api/src/routes/graphql/clients/helius.ts

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,12 @@ export class Helius extends RESTDataSource {
104104
until?: string,
105105
mint?: string
106106
): Promise<EnrichedTransaction[]> {
107-
let isNativeTransferFilter = false;
108107
let target = address;
109-
110-
if (mint) {
111-
if (mint !== SystemProgram.programId.toBase58()) {
112-
target = getATAAddressSync({
113-
mint: new PublicKey(mint),
114-
owner: new PublicKey(address),
115-
}).toBase58();
116-
} else {
117-
isNativeTransferFilter = true;
118-
}
108+
if (mint && mint !== SystemProgram.programId.toBase58()) {
109+
target = getATAAddressSync({
110+
mint: new PublicKey(mint),
111+
owner: new PublicKey(address),
112+
}).toBase58();
119113
}
120114

121115
return this.get(`/v0/addresses/${target}/transactions`, {
@@ -124,12 +118,6 @@ export class Helius extends RESTDataSource {
124118
commitment: "confirmed",
125119
before,
126120
until,
127-
...(isNativeTransferFilter
128-
? {
129-
source: Source.SYSTEM_PROGRAM,
130-
type: TransactionType.TRANSFER,
131-
}
132-
: undefined),
133121
},
134122
});
135123
}

0 commit comments

Comments
 (0)