Skip to content

Commit

Permalink
Merge pull request #947 from everx-labs/IgorKoval/upd-deps
Browse files Browse the repository at this point in the history
Igor koval/upd deps
  • Loading branch information
IgorKoval authored Nov 13, 2024
2 parents 7815a02 + 432e013 commit 2eaf128
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 85 deletions.
121 changes: 64 additions & 57 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license = 'Apache-2.0'
name = 'ever-cli'
readme = 'README.md'
repository = 'https://github.com/everx-labs/ever-cli'
version = '0.41.0'
version = '0.42.0'

[dependencies]
anyhow = '1.0'
Expand All @@ -36,13 +36,13 @@ thiserror = '1.0'
tokio = { default-features = false, features = [ 'full' ], version = '1.21' }
tokio-retry = '0.3'
url = '2.3.1'
ever_abi = { git = 'https://github.com/everx-labs/ever-abi.git', tag = '2.7.11' }
ever_abi = { git = 'https://github.com/everx-labs/ever-abi.git', tag = '2.8.0' }
ever_assembler = { git = 'https://github.com/everx-labs/ever-assembler.git', tag = '1.8.0' }
ever_block = { git = 'https://github.com/everx-labs/ever-block.git', tag = '1.11.20' }
ever_block_json = { git = 'https://github.com/everx-labs/ever-block-json.git', tag = '0.9.37' }
ever_client = { git = 'https://github.com/everx-labs/ever-sdk.git', tag = '1.48.1' }
ever_client = { git = 'https://github.com/everx-labs/ever-sdk.git', tag = '1.49.0' }
ever_executor = { git = 'https://github.com/everx-labs/ever-executor.git', tag = '1.18.22' }
ever_sdk = { git = 'https://github.com/everx-labs/ever-sdk.git', tag = '1.48.1' }
ever_sdk = { git = 'https://github.com/everx-labs/ever-sdk.git', tag = '1.49.0' }
ever_vm = { git = 'https://github.com/everx-labs/ever-vm.git', tag = '2.2.21' }

[dev-dependencies]
Expand Down
6 changes: 3 additions & 3 deletions src/crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ pub fn load_keypair(keys: &str) -> Result<KeyPair, String> {
public: keys[64..].to_string(),
secret: keys[..64].to_string(),
})
} else if keys.find(' ').is_none() {
} else if keys.find(' ').is_some() {
generate_keypair_from_mnemonic(keys)
} else {
let keys = read_keys(keys)?;
Ok(keys)
} else {
generate_keypair_from_mnemonic(keys)
}
}

Expand Down
4 changes: 3 additions & 1 deletion src/debot/term_signing_box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use ever_client::crypto::{
get_signing_box, remove_signing_box, KeyPair, RegisteredSigningBox, SigningBoxHandle,
};
use std::io::{self, BufRead, BufReader, Read, Write};
use ever_client::encoding::decode_abi_bigint;

pub(super) struct TerminalSigningBox {
handle: SigningBoxHandle,
Expand Down Expand Up @@ -95,9 +96,10 @@ where
});
if let Ok(ref keys) = pair {
if !possible_keys.is_empty() {
let pub_key_in_radix10 = decode_abi_bigint(&*("0x".to_string() + &*keys.public)).unwrap().to_string();
if !possible_keys
.iter()
.any(|x| x.get(2..).unwrap() == keys.public.as_str())
.any(|x| *x == pub_key_in_radix10)
{
println!("Unexpected keys.");
println!(
Expand Down
Loading

0 comments on commit 2eaf128

Please sign in to comment.