Skip to content

Commit 8f86e17

Browse files
feat: pool Info check added
1 parent dfc55a9 commit 8f86e17

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ const swap = async () => {
2525
* Find pool information for the given token pair.
2626
*/
2727
const poolInfo = raydiumSwap.findPoolInfoForTokens(swapConfig.tokenAAddress, swapConfig.tokenBAddress);
28-
console.log('Found pool info');
28+
if (!poolInfo) {
29+
console.error('Pool info not found');
30+
return 'Pool info not found';
31+
} else {
32+
console.log('Found pool info');
33+
}
2934

3035
/**
3136
* Prepare the swap transaction with the given parameters.

0 commit comments

Comments
 (0)