diff --git a/osmosis-cw-pool/Cargo.lock b/osmosis-cw-pool/Cargo.lock index 149f43f..d8182c9 100644 --- a/osmosis-cw-pool/Cargo.lock +++ b/osmosis-cw-pool/Cargo.lock @@ -1168,7 +1168,7 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "osmosis-cw-pool" -version = "1.0.1" +version = "1.0.2" dependencies = [ "cosmwasm-schema", "cosmwasm-std", diff --git a/osmosis-cw-pool/Cargo.toml b/osmosis-cw-pool/Cargo.toml index 5e8fbb9..505a7d3 100644 --- a/osmosis-cw-pool/Cargo.toml +++ b/osmosis-cw-pool/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "osmosis-cw-pool" -version = "1.0.1" +version = "1.0.2" authors = ["Kerber0x "] description = "Osmosis Pool interface implementation to hook Osmosis with White Whale pools" edition = "2021" diff --git a/osmosis-cw-pool/src/queries.rs b/osmosis-cw-pool/src/queries.rs index c7e6a65..4ab6faa 100644 --- a/osmosis-cw-pool/src/queries.rs +++ b/osmosis-cw-pool/src/queries.rs @@ -88,7 +88,7 @@ pub(crate) fn spot_price( .ok_or_else(|| StdError::generic_err("Base asset not found"))?; Ok(SpotPriceResponse { - spot_price: Decimal::from_ratio(base_asset_amount, quote_asset_amount), + spot_price: Decimal::from_ratio(quote_asset_amount, base_asset_amount), }) } diff --git a/osmosis-cw-pool/tests/integration.rs b/osmosis-cw-pool/tests/integration.rs index 8ce58e6..f3f48c9 100644 --- a/osmosis-cw-pool/tests/integration.rs +++ b/osmosis-cw-pool/tests/integration.rs @@ -573,8 +573,8 @@ fn check_queries() { res, SpotPriceResponse { spot_price: Decimal::from_ratio( - Uint128::from(10_010_000u128), - Uint128::from(9_990_019u128) + Uint128::from(9_990_019u128), + Uint128::from(10_010_000u128) ) } ); @@ -591,8 +591,8 @@ fn check_queries() { res, SpotPriceResponse { spot_price: Decimal::from_ratio( - Uint128::from(9_990_019u128), - Uint128::from(10_010_000u128) + Uint128::from(10_010_000u128), + Uint128::from(9_990_019u128) ) } ); @@ -615,7 +615,7 @@ fn check_queries() { assert_eq!( res, Config { - white_whale_pool: ww_pool.clone() + white_whale_pool: ww_pool.clone(), } ); }, diff --git a/osmosis-cw-pool/tests/test_artifacts/osmosis_cw_pool.wasm b/osmosis-cw-pool/tests/test_artifacts/osmosis_cw_pool.wasm index c4dc70c..883bc34 100644 Binary files a/osmosis-cw-pool/tests/test_artifacts/osmosis_cw_pool.wasm and b/osmosis-cw-pool/tests/test_artifacts/osmosis_cw_pool.wasm differ diff --git a/osmosis-cw-pool/tests/test_artifacts/osmosis_cw_pool_v101.wasm b/osmosis-cw-pool/tests/test_artifacts/osmosis_cw_pool_v101.wasm new file mode 100644 index 0000000..c4dc70c Binary files /dev/null and b/osmosis-cw-pool/tests/test_artifacts/osmosis_cw_pool_v101.wasm differ