Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
EvgenKor committed Jan 26, 2024
1 parent 59a94f5 commit 2d0ad2a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
2 changes: 0 additions & 2 deletions libzkbob-rs-wasm/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ use std::collections::HashMap;
use std::rc::Rc;
use std::{cell::RefCell, convert::TryInto};
use std::str::FromStr;

use libzkbob_rs::libzeropool::native::cipher::MessageEncryptionType;
#[cfg(feature = "multicore")]
use rayon::prelude::*;

Expand Down
4 changes: 0 additions & 4 deletions libzkbob-rs-wasm/src/client/tx_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,13 @@ impl JsTxType for IDepositPermittableData {
fn to_native(&self) -> Result<NativeTxType<Fr>, JsValue> {
use web_sys::console;

console::log_1(&"Beacon #1".into());

let DepositPermittableData {
base_fields,
amount,
deadline,
holder,
} = serde_wasm_bindgen::from_value(self.into())?;

console::log_1(&"Beacon #2".into());

let operator = TxOperator {
proxy_address: base_fields.proxy,
proxy_fee: base_fields.proxy_fee,
Expand Down
8 changes: 4 additions & 4 deletions libzkbob-rs/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use libzeropool::{
native::{
account::Account,
boundednum::BoundedNum,
cipher::{self, MessageEncryptionType},
cipher,
key::derive_key_p_d,
note::Note,
params::PoolParams,
Expand Down Expand Up @@ -183,9 +183,9 @@ where
}

/// Same as constructor but accepts arbitrary data as spending key.
pub fn from_seed(seed: &[u8], pool_id: u32, msg_enc_type: MessageEncryptionType, state: State<D, P>, params: P) -> Self {
pub fn from_seed(seed: &[u8], pool_id: u32, is_obsolete_pool: bool, state: State<D, P>, params: P) -> Self {
let sk = reduce_sk(seed);
Self::new(sk, pool_id, msg_enc_type, state, params)
Self::new(sk, pool_id, is_obsolete_pool, state, params)
}

fn generate_address_components(
Expand Down Expand Up @@ -366,7 +366,7 @@ where
.unwrap_or_else(|| self.state.tree.next_index())
}));

let (fee, tx_data, user_data) = {
let (fee, tx_data, _user_data) = {
let mut tx_data: Vec<u8> = vec![];
match &tx {
TxType::Deposit(operator, user_data, _) => {
Expand Down

0 comments on commit 2d0ad2a

Please sign in to comment.