From 874945ef30e91776983cd8a8342a1308ae9d6cd9 Mon Sep 17 00:00:00 2001 From: Kamil Koczurek Date: Fri, 1 Sep 2023 17:59:39 +0200 Subject: [PATCH] compilation fixups --- Cargo.lock | 16 ++++++++-------- core/gsb-api/Cargo.toml | 4 ++-- core/market/tests/test_rest_api.rs | 2 +- core/payment/src/api/allocations.rs | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 542a7fe67c..a130174c78 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -93,7 +93,7 @@ dependencies = [ "actix-tls", "actix-utils", "ahash 0.8.3", - "base64 0.21.2", + "base64 0.21.3", "bitflags 1.3.2", "brotli", "bytes 1.4.0", @@ -694,7 +694,7 @@ dependencies = [ "actix-tls", "actix-utils", "ahash 0.7.6", - "base64 0.21.2", + "base64 0.21.3", "bytes 1.4.0", "cfg-if 1.0.0", "cookie", @@ -761,9 +761,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53" [[package]] name = "bellman_ce" @@ -5343,7 +5343,7 @@ version = "0.11.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" dependencies = [ - "base64 0.21.2", + "base64 0.21.3", "bytes 1.4.0", "encoding_rs", "futures-core", @@ -7335,7 +7335,7 @@ checksum = "e7141e445af09c8919f1d5f8a20dae0b20c3b57a45dee0d5823c6ed5d237f15a" dependencies = [ "bitflags 1.3.2", "chrono", - "rustc_version 0.2.3", + "rustc_version 0.4.0", ] [[package]] @@ -8166,7 +8166,7 @@ dependencies = [ "actix-web-actors", "anyhow", "awc", - "base64 0.11.0", + "base64 0.21.3", "bytes 1.4.0", "ctor", "env_logger 0.10.0", @@ -8248,7 +8248,7 @@ name = "ya-manifest-utils" version = "0.2.0" dependencies = [ "anyhow", - "base64 0.21.2", + "base64 0.21.3", "chrono", "golem-certificate", "hex", diff --git a/core/gsb-api/Cargo.toml b/core/gsb-api/Cargo.toml index e8b42dfe77..8d1db889b9 100644 --- a/core/gsb-api/Cargo.toml +++ b/core/gsb-api/Cargo.toml @@ -25,10 +25,10 @@ lazy_static = "1" thiserror = "1" uuid = { version = "1.2.2", features = ["v4"] } futures = "0.3" -base64 = "0" +base64 = "0.21.3" flexbuffers = "2" bytes = "1" -tokio = { version = "1", features=["macros"] } +tokio = { version = "1", features = ["macros"] } [dev-dependencies] ya-core-model = { version = "^0.9", features = ["gftp"] } diff --git a/core/market/tests/test_rest_api.rs b/core/market/tests/test_rest_api.rs index a07fc836a4..ad61116a70 100644 --- a/core/market/tests/test_rest_api.rs +++ b/core/market/tests/test_rest_api.rs @@ -410,7 +410,7 @@ async fn test_rest_query_agreement_events() { let app = network.get_rest_app("Node-1").await; let url = format!( "/market-api/v1/agreementEvents?{}", - QueryParamsBuilder::new() + QueryParamsBuilder::default() .put("afterTimestamp", Some(after_timestamp)) .put("appSessionId", Some("r-session")) .put("maxEvents", Some(10)) diff --git a/core/payment/src/api/allocations.rs b/core/payment/src/api/allocations.rs index f9814eefb8..1b0733eb30 100644 --- a/core/payment/src/api/allocations.rs +++ b/core/payment/src/api/allocations.rs @@ -173,7 +173,7 @@ fn amend_allocation_fields( .unwrap_or_else(|| old_allocation.total_amount.clone()); let remaining_amount = total_amount.clone() - &old_allocation.spent_amount; - if remaining_amount < 0 { + if remaining_amount < BigDecimal::from(0) { return Err("New allocation would be smaller than the already spent amount"); } if let Some(timeout) = update.timeout {