This commit is contained in:
ghassmo
2021-10-17 08:40:26 +03:00
parent 2ba3e7e033
commit 043bb61f78
7 changed files with 9 additions and 9 deletions

View File

@@ -381,7 +381,7 @@ pub struct State {
impl ProgramState for State {
fn is_valid_cashier_public_key(&self, public: &jubjub::SubgroupPoint) -> bool {
debug!(target: "CLIENT STATE", "Check if it is valid cashier public key");
return self.public_keys.contains(public);
self.public_keys.contains(public)
}
fn is_valid_merkle(&self, merkle_root: &MerkleNode) -> bool {

View File

@@ -103,7 +103,7 @@ async fn serve(
},
Err(e) => {
debug!(target: "RPC SERVER", "Failed to establish TLS connection: {:#}", e);
return Ok(());
Ok(())
}
},
}

View File

@@ -312,7 +312,7 @@ impl BtcClient {
input: inputs,
output: vec![TxOut {
script_pubkey: main_script_pubkey,
value: value,
value,
}],
lock_time: 0,
version: 2,

View File

@@ -219,8 +219,9 @@ impl SolClient {
));
}
let amnt = cur_balance - prev_balance;
if mint.is_some() {
let amnt = cur_balance - prev_balance;
let ui_amnt = amnt / u64::pow(10, decimals as u32);
send_notification
@@ -237,7 +238,6 @@ impl SolClient {
debug!(target: "SOL BRIDGE", "Received {} {:?} tokens", ui_amnt, mint.unwrap());
let _ = self.send_tok_to_main_wallet(&rpc, &mint.unwrap(), amnt, decimals, &keypair)?;
} else {
let amnt = cur_balance - prev_balance;
let ui_amnt = lamports_to_sol(amnt);
send_notification

View File

@@ -63,7 +63,7 @@ impl CashierDb {
let conn = Connection::open(&self.path)?;
debug!(target: "CASHIERDB", "Opened connection at path {:?}", self.path);
conn.pragma_update(None, "key", &self.password)?;
conn.execute_batch(&contents)?;
conn.execute_batch(contents)?;
*self.initialized.lock().await = true;
} else {
debug!(
@@ -264,7 +264,7 @@ impl CashierDb {
WHERE d_key_public = :d_key_public AND confirm = :confirm;",
)?;
let addr_iter = stmt.query_map(
&[(":d_key_public", &d_key_public), (":confirm", &&confirm)],
&[(":d_key_public", &d_key_public), (":confirm", &confirm)],
|row| Ok((row.get(0)?, row.get(1)?, row.get(2)?, row.get(3)?)),
)?;

View File

@@ -13,7 +13,7 @@ pub trait WalletApi {
}
fn get_value_deserialized<D: Decodable>(&self, key: &Vec<u8>) -> Result<D> {
let v: D = deserialize(&key)?;
let v: D = deserialize(key)?;
Ok(v)
}
}

View File

@@ -80,7 +80,7 @@ impl WalletDb {
let conn = Connection::open(&self.path)?;
debug!(target: "WALLETDB", "OPENED CONNECTION AT PATH {:?}", self.path);
conn.pragma_update(None, "key", &self.password)?;
conn.execute_batch(&contents)?;
conn.execute_batch(contents)?;
*self.initialized.lock().await = true;
} else {
debug!(