Skip to content

Commit

Permalink
update deps, bump version number
Browse files Browse the repository at this point in the history
  • Loading branch information
Ash-L2L committed Jan 17, 2025
1 parent abcc076 commit 9cca3e2
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bip300301_enforcer"
version = "0.1.6"
version = "0.1.7"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down Expand Up @@ -66,7 +66,7 @@ rev = "45f74e37b8295207d29ddbbce10d563ec9f67151"

[dependencies.cusf-enforcer-mempool]
git = "https://github.com/LayerTwo-Labs/cusf-enforcer-mempool.git"
rev = "83097d008f2832979ee8793b031bdd33f0c6c88d"
rev = "fce4283eba07df788ed3830cf3b51e35a7c590a9"

[dependencies.educe]
version = "0.6.0"
Expand Down
2 changes: 1 addition & 1 deletion cusf_sidechain_proto
2 changes: 1 addition & 1 deletion integration_tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ async fn deposit(post_setup: &mut PostSetup, mining_mode: MiningMode) -> anyhow:
.wallet_service_client
.create_deposit_transaction(CreateDepositTransactionRequest {
sidechain_id: Some(0),
address: Some(Hex::encode(&[69; 32])),
address: Some("sidechain address".to_owned()),
value_sats: Some(DEPOSIT_AMOUNT_SATS),
fee_sats: Some(DEPOSIT_FEE_SATS),
})
Expand Down
7 changes: 3 additions & 4 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -981,13 +981,12 @@ impl WalletService for crate::wallet::Wallet {
err,
)
})?;
let address: Vec<u8> = address
.ok_or_else(|| missing_field::<CreateDepositTransactionRequest>("address"))?
.decode_tonic::<CreateDepositTransactionRequest, _>("address")?;
let address: String =
address.ok_or_else(|| missing_field::<CreateDepositTransactionRequest>("address"))?;
if address.is_empty() {
return Err(invalid_field_value::<CreateDepositTransactionRequest, _>(
"address",
&hex::encode(address),
&address,
Error::AddressMustBeNonEmpty,
));
}
Expand Down
11 changes: 6 additions & 5 deletions src/wallet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ impl Wallet {
pub async fn create_deposit(
&self,
sidechain_number: SidechainNumber,
sidechain_address: Vec<u8>,
sidechain_address: String,
value: Amount,
fee: Option<Amount>,
) -> Result<bitcoin::Txid> {
Expand All @@ -1135,10 +1135,11 @@ impl Wallet {
op_drivechain_output.script_pubkey.to_asm_string(),
);

let sidechain_address_data = bdk_wallet::bitcoin::script::PushBytesBuf::try_from(
sidechain_address,
)
.map_err(|err| miette!("failed to convert sidechain address to PushBytesBuf: {err:#}"))?;
let sidechain_address_data =
bdk_wallet::bitcoin::script::PushBytesBuf::try_from(sidechain_address.into_bytes())
.map_err(|err| {
miette!("failed to convert sidechain address to PushBytesBuf: {err:#}")
})?;

let psbt = self
.create_deposit_psbt(
Expand Down

0 comments on commit 9cca3e2

Please sign in to comment.