Skip to content

Commit

Permalink
fix issue with simulate
Browse files Browse the repository at this point in the history
  • Loading branch information
nil-amrutlal committed Nov 9, 2023
1 parent 6cd7b8f commit 78ab374
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/apps/graph/src/devnet/simulation/simulate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export async function simulate({

// This is to simulate cross chain transfers
if (transferType === 'xchaintransfer') {
while (account.chainId === nextAccount.chainId) {
if (account.chainId === nextAccount.chainId) {
nextAccount = {
...nextAccount,
chainId: `${getRandomNumber(
Expand All @@ -128,6 +128,12 @@ export async function simulate({
)}` as ChainId,
};
}

if (account.chainId === nextAccount.chainId) {
logger.info('Skipping cross chain transfer to same chain');
continue;
}

logger.info('Cross chain transfer', account, nextAccount);
result = await crossChainTransfer({
from: account,
Expand Down

0 comments on commit 78ab374

Please sign in to comment.