Skip to content

Commit

Permalink
fix: token and serverconfig fields
Browse files Browse the repository at this point in the history
  • Loading branch information
DhananjayPurohit committed May 20, 2024
1 parent 83b9a0a commit 852fafa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions lib/src/wallet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ pub struct Settings {
#[derive(Debug, Serialize, Deserialize, Clone)]
#[cfg_attr(feature = "bindings", derive(uniffi::Record))]
pub struct Token {
// pub btc_payment_address: String,
// pub fee: String,
pub btc_payment_address: String,
pub fee: String,
pub lightning_invoice: String,
pub processor_id: String,
pub token_id: String,
pub confirmed: bool,
pub spent: bool,
// pub expiry: String,
pub expiry: String,
}

#[derive(Debug, Serialize, Deserialize, Clone)]
Expand Down
2 changes: 2 additions & 0 deletions server/src/server_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ impl Default for ServerConfig {
lockheight_init: 10000,
lh_decrement: 100,
connection_string: String::from("postgresql://postgres:postgres@localhost/mercury"),
batch_timeout: 120,
}
}
}
Expand All @@ -39,6 +40,7 @@ impl From<ConfigRs> for ServerConfig {
lockheight_init: config.get::<u32>("lockheight_init").unwrap_or(0),
lh_decrement: config.get::<u32>("lh_decrement").unwrap_or(0),
connection_string: config.get::<String>("connection_string").unwrap_or_else(|_| String::new()),
batch_timeout: config.get::<u32>("batch_timeout").unwrap_or(0),
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,24 +443,24 @@ pub fn isEnclavePubkeyPartOfCoin(coin: JsValue, enclave_pubkey: String) -> bool
pub fn getMockWallet() -> JsValue {
let tokens = vec![
Token {
// btc_payment_address: String::from("bc1..."),
// fee: String::from("0.001"),
btc_payment_address: String::from("bc1..."),
fee: String::from("0.001"),
lightning_invoice: String::from("lnbc10u1pj3knpdsp5k9f25s2wpzewkf9c78pftkgnkuuz82erkcjml7zkgsp7znyhs5yspp5rxz3tkc7ydgln3u7ez6duhp0g6jpzgtnn7ph5xrjy6muh9xm07wqdp2f9h8vmmfvdjjqen0wgsy6ctfdeehgcteyp6x76m9dcxqyjw5qcqpj9qyysgq6z9whs8am75r6mzcgt76vlwgk5g9yq5g8xefdxx6few6d5why7fs7h5g2dx9hk7s60ywtnkyc0f3p0cha4a9kmgkq5jvu5e7hvsaawqpjtf8p4"),
processor_id: String::from("e04r5e00-cgdd-5yb7-y704-52631405720e"),
token_id: String::from("e08aee00-cfed-4ab7-b304-38d61405720e"),
confirmed: true,
spent: false,
// expiry: "2023-11-07T12:34:56.789Z".to_string()
expiry: "2023-11-07T12:34:56.789Z".to_string()
},
Token {
// btc_payment_address: String::from("bc1..."),
// fee: String::from("0.001"),
btc_payment_address: String::from("bc1..."),
fee: String::from("0.001"),
processor_id: String::from("e04r5e00-cgdd-5yb7-y704-52631405720e"),
lightning_invoice: String::from("lnbc10u1pj3knpdsp5k9f25s2wpzewkf9c78pftkgnkuuz82erkcjml7zkgsp7znyhs5yspp5rxz3tkc7ydgln3u7ez6duhp0g6jpzgtnn7ph5xrjy6muh9xm07wqdp2f9h8vmmfvdjjqen0wgsy6ctfdeehgcteyp6x76m9dcxqyjw5qcqpj9qyysgq6z9whs8am75r6mzcgt76vlwgk5g9yq5g8xefdxx6few6d5why7fs7h5g2dx9hk7s60ywtnkyc0f3p0cha4a9kmgkq5jvu5e7hvsaawqpjtf8p4"),
token_id: String::from("aed9a34c-5666-4d83-940f-9b74e16b8672"),
confirmed: true,
spent: false,
// expiry: "2023-11-07T12:34:56.789Z".to_string()
expiry: "2023-11-07T12:34:56.789Z".to_string()
}
];

Expand Down

0 comments on commit 852fafa

Please sign in to comment.