diff --git a/sdk/tests/crosses-testnet.test.ts b/sdk/tests/crosses-testnet.test.ts index 6eb98e5a..3d850da0 100644 --- a/sdk/tests/crosses-testnet.test.ts +++ b/sdk/tests/crosses-testnet.test.ts @@ -56,7 +56,7 @@ describe('testnet-crosses-limitations', async () => { } const swapper = keyring.addFromUri('//Bob') - const swapAmount = 459500n + const swapAmount = 758215n const tokenX = isTokenX(token0Address, token1Address) ? token0Address : token1Address await psp22.mint(swapper, swapAmount, tokenX) @@ -74,6 +74,6 @@ describe('testnet-crosses-limitations', async () => { const crossed = Math.abs( integerSafeCast((poolAfterSwap.currentTickIndex - poolBeforeSwap.currentTickIndex) / 10n) ) - assert.equal(crossed, 90) + assert.equal(crossed, 146) }) }) diff --git a/src/contracts/storage/position.rs b/src/contracts/storage/position.rs index a09ac324..3359e894 100644 --- a/src/contracts/storage/position.rs +++ b/src/contracts/storage/position.rs @@ -517,7 +517,7 @@ mod tests { PoolKey::default(), &mut lower_tick, &mut upper_tick, - current_timestamp*1000, + current_timestamp * 1000, Liquidity::new(100000000), pool_before.sqrt_price, pool_before.sqrt_price, @@ -545,7 +545,7 @@ mod tests { PoolKey::default(), &mut lower_tick, &mut upper_tick, - current_timestamp*1000, + current_timestamp * 1000, Liquidity::new(100000000), pool_before.sqrt_price, pool_before.sqrt_price, @@ -574,7 +574,7 @@ mod tests { PoolKey::default(), &mut lower_tick, &mut upper_tick, - (current_timestamp + 1)*1000, + (current_timestamp + 1) * 1000, Liquidity::new(100000000), pool_before.sqrt_price, pool_before.sqrt_price, diff --git a/src/e2e/max_tick_cross.rs b/src/e2e/max_tick_cross.rs index 6074454a..e004fd0a 100644 --- a/src/e2e/max_tick_cross.rs +++ b/src/e2e/max_tick_cross.rs @@ -80,7 +80,7 @@ pub mod e2e_tests { .unwrap(); assert_eq!(pool.liquidity, liquidity); - let amount = 755_000; + let amount = 702_500; let bob = ink_e2e::bob(); mint!(client, token_x, address_of!(Bob), amount, bob).unwrap(); let amount_x = balance_of!(client, token_x, address_of!(Bob)); @@ -113,7 +113,7 @@ pub mod e2e_tests { let crosses_after_quote = ((pool_after_quote.current_tick_index - pool_before.current_tick_index) / 10).abs(); assert_eq!(crosses_after_quote, 0); - assert_eq!(quote_result.ticks.len(), 145); + assert_eq!(quote_result.ticks.len(), 135); swap!( client, @@ -137,7 +137,7 @@ pub mod e2e_tests { .unwrap(); let crosses = ((pool_after.current_tick_index - pool_before.current_tick_index) / 10).abs(); - assert_eq!(crosses, 145); + assert_eq!(crosses, 135); assert_eq!( pool_after.current_tick_index, get_tick_at_sqrt_price(quote_result.target_sqrt_price, 10).unwrap()