diff --git a/Cargo.toml b/Cargo.toml index 48144300..b999fdf8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ resolver = "2" members = ["crates/*", "examples/native", "examples/snark"] [workspace.package] -version = "0.6.1" +version = "0.7.0" edition = "2021" license = "GPL-3.0" authors = ["RND "] diff --git a/crates/core/src/ecc/signers/bip137.rs b/crates/core/src/ecc/signers/bip137.rs index 75f503f5..eb497e3d 100644 --- a/crates/core/src/ecc/signers/bip137.rs +++ b/crates/core/src/ecc/signers/bip137.rs @@ -6,8 +6,8 @@ use sha2::Sha256; use crate::ecc::PublicKey; use crate::ecc::PublicKeyAddress; -use crate::error::Result; use crate::error::Error; +use crate::error::Result; /// recover pubkey according to signature. /// | y-parity | x-order | compression | recovery id | v | @@ -28,11 +28,11 @@ pub fn recover(msg: &[u8], sig: impl AsRef<[u8]>) -> Result { let hash = self::magic_hash(msg); if sig_byte[64] >= 27 && sig_byte[64] <= 30 { - sig_byte[64] -= 27; - } else if sig_byte[64] >=31 && sig_byte[64] <= 34 { - sig_byte[64] -= 31; + sig_byte[64] -= 27; + } else if sig_byte[64] >= 31 && sig_byte[64] <= 34 { + sig_byte[64] -= 31; } else { - return Err(Error::InvalidRecoverId(sig_byte[64])) + return Err(Error::InvalidRecoverId(sig_byte[64])); } crate::ecc::recover_hash(&hash, sig_byte) } diff --git a/package.json b/package.json index c8596d09..ab06561a 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "RND " ], "description": "Rings is a structured peer-to-peer network implementation using WebRTC, Chord algorithm, and full WebAssembly (WASM) support.\n", - "version": "0.6.1", + "version": "0.7.0", "license": "GPL-3.0", "repository": { "type": "git",