diff --git a/src/market/market_utils.cairo b/src/market/market_utils.cairo index eb958537..93315adf 100644 --- a/src/market/market_utils.cairo +++ b/src/market/market_utils.cairo @@ -2831,6 +2831,7 @@ fn validate_market_token_balance_with_token( .balance_of(market.market_token) .low .into(); + 'Issue here'.print(); let expected_min_balance: u256 = get_expected_min_token_balance(data_store, market, token); assert(balance >= expected_min_balance, MarketError::INVALID_MARKET_TOKEN_BALANCE); diff --git a/tests/integration/swap_test.cairo b/tests/integration/swap_test.cairo index 22e836a4..6b436b38 100644 --- a/tests/integration/swap_test.cairo +++ b/tests/integration/swap_test.cairo @@ -86,18 +86,19 @@ fn test_deposit_market_integration() { // Set params in data_store data_store.set_address(keys::fee_token(), market.index_token); - data_store.set_u128(keys::max_swap_path_length(), 5); + data_store.set_u256(keys::max_swap_path_length(), 5); // Set max pool amount. data_store - .set_u128( + .set_u256( keys::max_pool_amount_key(market.market_token, market.long_token), 500000000000000000 ); data_store - .set_u128( + .set_u256( keys::max_pool_amount_key(market.market_token, market.short_token), 500000000000000000 ); + oracle.set_price_testing_eth(5000); // Fill the pool. IERC20Dispatcher { contract_address: market.long_token }.mint(market.market_token, 50000000000); IERC20Dispatcher { contract_address: market.short_token } @@ -684,7 +685,7 @@ fn deploy_role_store() -> ContractAddress { let caller_address: ContractAddress = contract_address_const::<'caller'>(); let deployed_contract_address = contract_address_const::<'role_store'>(); start_prank(deployed_contract_address, caller_address); - contract.deploy_at(@array![], deployed_contract_address).unwrap() + contract.deploy_at(@array![caller_address.into()], deployed_contract_address).unwrap() } fn deploy_event_emitter() -> ContractAddress {