Skip to content

Commit d705807

Browse files
correct the typo in swap_exact_token_for_tokens
1 parent 020ebe7 commit d705807

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tokens/token-swap/anchor/programs/token-swap/src/instructions/swap_exact_tokens_for_tokens.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ pub fn swap_exact_tokens_for_tokens(
134134
// We tolerate if the new invariant is higher because it means a rounding error for LPs
135135
ctx.accounts.pool_account_a.reload()?;
136136
ctx.accounts.pool_account_b.reload()?;
137-
if invariant > ctx.accounts.pool_account_a.amount * ctx.accounts.pool_account_a.amount {
137+
if invariant > ctx.accounts.pool_account_a.amount * ctx.accounts.pool_account_b.amount {
138138
return err!(TutorialError::InvariantViolated);
139139
}
140140

0 commit comments

Comments
 (0)