Skip to content

Commit 94668ac

Browse files
authored
Include unofficial lisitings
1 parent 53b9c5e commit 94668ac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/trimMainnet.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ function trimMainnetJson() {
3333
// Get the token addresses from swapConfig
3434
const { tokenAAddress, tokenBAddress } = swapConfig;
3535

36-
// Find the pool that matches the token pair
37-
const relevantPool = mainnetData.official.find((pool: PoolInfo) =>
36+
// Find the pool that matches the token pair in both official and unofficial pools
37+
const relevantPool = [...mainnetData.official, ...(mainnetData.unOfficial || [])].find((pool: PoolInfo) =>
3838
(pool.baseMint === tokenAAddress && pool.quoteMint === tokenBAddress) ||
3939
(pool.baseMint === tokenBAddress && pool.quoteMint === tokenAAddress)
4040
);
@@ -55,4 +55,4 @@ function trimMainnetJson() {
5555
console.log('Trimmed mainnet.json file has been created as trimmed_mainnet.json');
5656
}
5757

58-
trimMainnetJson();
58+
trimMainnetJson();

0 commit comments

Comments
 (0)