Skip to content

Commit

Permalink
Clean up warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewDarnell committed Mar 9, 2024
1 parent f61b1b7 commit 3768189
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 24 deletions.
4 changes: 2 additions & 2 deletions api/src/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ impl TransferTransaction {
info!("Setting Expiration Tick For Transaction To {}", tick + TICK_OFFSET);
let digest: Vec<u8> = k12_bytes(&t.as_bytes_without_signature());
//let mut sub_seed: [u8; 32] = [0; 32];
let mut sub_seed: Vec<u8> = get_subseed(source_identity.seed.as_str()).expect("Failed To Get SubSeed!");
let sub_seed: Vec<u8> = get_subseed(source_identity.seed.as_str()).expect("Failed To Get SubSeed!");
#[allow(unused_assignments)]
let mut sig: [u8; 64] = [0; 64];

sig = sign_raw(&sub_seed, &pub_key_src, digest.as_slice().try_into().unwrap());
t._signature = sig.to_vec();
t
Expand Down
2 changes: 1 addition & 1 deletion crypto/src/fourq/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ pub fn fp2div1271(a: &mut F2elmT) {
let mut mask: u64;
let mut temp = [0u64; 2];

mask = 0u64.wrapping_sub((1 & a[0][0]));
mask = 0u64.wrapping_sub(1 & a[0][0]);
addcarry_u64(addcarry_u64(0, a[0][0], mask, &mut temp[0]), a[0][1], mask >> 1, &mut temp[1]);
a[0][0] = __shiftright128(temp[0], temp[1], 1);
a[0][1] = temp[1] >> 1;
Expand Down
2 changes: 1 addition & 1 deletion crypto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub mod hash {


pub mod qubic_identities {
use core::{ptr::copy_nonoverlapping, fmt::{Debug, Display}, str::FromStr};
use core::ptr::copy_nonoverlapping;
use tiny_keccak::{Hasher, IntoXof, KangarooTwelve, Xof};
use crate::{A_LOWERCASE_ASCII, hash};
use hash::k12_bytes;
Expand Down
11 changes: 2 additions & 9 deletions src/routes/identity.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
use std::collections::HashMap;
use std::sync::mpsc::Sender;
use std::sync::Mutex;
use std::time::Duration;
use rocket::get;
use spmc::Receiver;
use uuid::Uuid;
use store::get_db_path;
use store::sqlite::crud::insert_new_identity;
use store::sqlite::crud::master_password::get_master_password;
use crypto::passwords::verify_password;
use logger::error;

#[get("/balance/<address>")]
pub fn balance(address: &str) -> String {
Expand Down Expand Up @@ -76,7 +69,7 @@ pub fn create_random_identity(password: &str) -> String {

let response = match insert_new_identity(get_db_path().as_str(), &id) {
Ok(_) => "200",
Err(err) => "Failed To Insert Identity!"
Err(_) => "Failed To Insert Identity!"
};
return format!("{}", response);
}
Expand All @@ -94,7 +87,7 @@ pub fn add_identity(seed: &str) -> String {
let id: identity::Identity = identity::Identity::new(seed);
let response = match insert_new_identity(get_db_path().as_str(), &id) {
Ok(_) => "200",
Err(err) => "Failed To Insert Identity!"
Err(_) => "Failed To Insert Identity!"
};
return format!("{}", response);
}
Expand Down
10 changes: 0 additions & 10 deletions src/routes/info.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@

use std::collections::HashMap;
use std::sync::Mutex;
use std::sync::mpsc::Sender;
use std::time::Duration;
use spmc::Receiver;
use rocket::get;
use uuid::Uuid;
use store;
use identity;
use crypto;
use logger::{debug, error};

#[get("/tick")]
pub fn latest_tick() -> String {
Expand Down
1 change: 0 additions & 1 deletion src/routes/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use std::time::Duration;
use rocket::get;
use spmc::Receiver;
use uuid::Uuid;
use store;


//transfer/${sourceIdentity}/${destinationIdentity}/${amountToSend}/${expirationTick}/${password}
Expand Down

0 comments on commit 3768189

Please sign in to comment.