Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update amounts from u32 to u64 in create requests #79

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ pub mod swaps;
/// utilities (key, preimage, error)
pub mod util;


// Re-export common libs, so callers can make use of them and avoid version conflicts
pub use bitcoin;
pub use electrum_client;
Expand Down
10 changes: 5 additions & 5 deletions src/swaps/boltz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ impl Subscription {
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CreateReverseRequest {
pub invoice_amount: u32,
pub invoice_amount: u64,
pub from: String,
pub to: String,
pub preimage_hash: sha256::Hash,
Expand Down Expand Up @@ -723,7 +723,7 @@ pub struct CreateReverseResponse {
pub lockup_address: String,
pub refund_public_key: PublicKey,
pub timeout_block_height: u32,
pub onchain_amount: u32,
pub onchain_amount: u64,
#[serde(skip_serializing_if = "Option::is_none")]
pub blinding_key: Option<String>,
}
Expand Down Expand Up @@ -775,7 +775,7 @@ pub struct ChainSwapDetails {
pub lockup_address: String,
pub server_public_key: PublicKey,
pub timeout_block_height: u32,
pub amount: u32,
pub amount: u64,
#[serde(skip_serializing_if = "Option::is_none")]
pub blinding_key: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
Expand All @@ -797,9 +797,9 @@ pub struct CreateChainRequest {
#[serde(skip_serializing_if = "Option::is_none")]
pub refund_public_key: Option<PublicKey>,
#[serde(skip_serializing_if = "Option::is_none")]
pub user_lock_amount: Option<u32>,
pub user_lock_amount: Option<u64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub server_lock_amount: Option<u32>,
pub server_lock_amount: Option<u64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub pair_hash: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
Expand Down
2 changes: 1 addition & 1 deletion src/util/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ use lightning_invoice::{Bolt11Invoice, RouteHintHop};
use crate::{error::Error, network::electrum::ElectrumConfig};

pub mod ec;
pub mod secrets;
#[cfg(feature = "lnurl")]
pub mod lnurl;
pub mod secrets;
/// Setup function that will only run once, even if called multiple times.

pub fn liquid_genesis_hash(electrum_config: &ElectrumConfig) -> Result<elements::BlockHash, Error> {
Expand Down
Loading