Skip to content

Commit

Permalink
Merge pull request #65 from Cussin/main
Browse files Browse the repository at this point in the history
Show slippage error for Ping Pong
  • Loading branch information
arbcaptain authored Feb 13, 2024
2 parents 8dea72c + cc76509 commit 502b680
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bot/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ const pingpongStrategy = async (jupiter, tokenA, tokenB) => {
outAmount: tx.outputAmount || 0,
profit,
performanceOfTx,
error: tx.error?.message || null,
error: tx.error?.code === 6001 ? "Slippage Tolerance Exceeded" : tx.error?.message || null,
};

var waittime = await waitabit(100);
Expand Down Expand Up @@ -523,7 +523,7 @@ const run = async () => {

// Double check the wallet has sufficient amount of tokenA
var realbalanceTokenA = await checkTokenABalance(tokenA,cache.initialBalance.tokenA);

if (realbalanceTokenA<cache.initialBalance.tokenA){
console.log('Balance Lookup is too low for token: '+realbalanceTokenA+' < '+cache.initialBalance.tokenA);
process.exit();
Expand Down

0 comments on commit 502b680

Please sign in to comment.