Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ const swap = async () => {
* Find pool information for the given token pair.
*/
const poolInfo = raydiumSwap.findPoolInfoForTokens(swapConfig.tokenAAddress, swapConfig.tokenBAddress);
console.log('Found pool info');
if (!poolInfo) {
console.error('Pool info not found');
return 'Pool info not found';
} else {
console.log('Found pool info');
}

/**
* Prepare the swap transaction with the given parameters.
Expand Down