Skip to content

Commit

Permalink
Release v0.10.3
Browse files Browse the repository at this point in the history
  • Loading branch information
aurexav committed Apr 1, 2024
1 parent e47b8b2 commit 5555f7a
Show file tree
Hide file tree
Showing 8 changed files with 420 additions and 433 deletions.
825 changes: 404 additions & 421 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ edition = "2021"
homepage = "https://substrate-minimal.hack.ink"
license = "GPL-3.0"
repository = "https://github.com/hack-ink/substrate-minimal"
version = "0.10.2"
version = "0.10.3"

[workspace.dependencies]
# crates.io
array-bytes = { version = "6.2" }
fxhash = { version = "0.2" }
once_cell = { version = "1.19" }
parity-scale-codec = { version = "3.6" }
reqwest = { version = "0.11" }
reqwest = { version = "0.12" }
scale-info = { version = "2.11" }
serde = { version = "1.0" }
serde_json = { version = "1.0" }
Expand Down
4 changes: 2 additions & 2 deletions subcryptor/src/keystore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ where
let decrypted =
secret_box.decrypt(nonce.into(), cipher).map_err(error::CryptoSecretBox::General)?;

Ok(array_bytes::slice2array(&decrypted[SEED_OFFSET..SEED_OFFSET + SECRET_KEY_LEN])
.map_err(Error::ArrayBytes)?)
array_bytes::slice2array(&decrypted[SEED_OFFSET..SEED_OFFSET + SECRET_KEY_LEN])
.map_err(Error::ArrayBytes)
}
#[test]
fn decrypt_keystore_should_work() {
Expand Down
4 changes: 1 addition & 3 deletions submetadatan/src/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
// std
use std::any::TypeId;
// crates.io
use scale_info::{
form::PortableForm, interner::UntrackedSymbol, Field, Type, TypeDef, TypeParameter, Variant, *,
};
use scale_info::{form::PortableForm, interner::UntrackedSymbol, *};

/// Compare two [`frame_metadata::StorageEntryMetadata`] and return the [`bool`] result.
pub fn storage_entry(
Expand Down
2 changes: 2 additions & 0 deletions subrpcer/src/client/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
//! Client helpers for JSON-RPC.
#[cfg(feature = "reqwest-client")] pub mod r;
#[cfg(feature = "ureq-client")] pub mod u;
2 changes: 2 additions & 0 deletions subrpcer/src/client/r.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! [`reqwest`] client helper for JSON-RPC.
// std
use std::sync::Arc;
// crates.io
Expand Down
10 changes: 6 additions & 4 deletions subrpcer/src/client/u.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
//! [`ureq`] client helper for JSON-RPC.
// crates.io
use serde_json::Value;
use ureq::{Error, Response};

/// A simple HTTP post helper which implements with [ureq](https://crates.io/crates/ureq).
#[allow(unused, clippy::result_large_err)]
pub fn send_jsonrpc(uri: &str, body: &Value) -> Result<Response, Error> {
ureq::post(uri)
#[allow(unused)]
pub fn send_jsonrpc(uri: &str, body: &Value) -> Result<Response, Box<Error>> {
Ok(ureq::post(uri)
.set("Content-Type", "application/json;charset=utf-8")
// TODO: accept reference
.send_json(body.to_owned())
.send_json(body.to_owned())?)
}
2 changes: 1 addition & 1 deletion subrpcer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub mod rpc;
pub mod state;
pub mod system;

#[cfg(any(feature = "reqwest-client", feature = "ureq-client"))] mod client;
#[cfg(any(feature = "reqwest-client", feature = "ureq-client"))] pub mod client;

// TODO: optimize the option param

Expand Down

0 comments on commit 5555f7a

Please sign in to comment.