Skip to content
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
4 changes: 2 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion bridge-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bridge-cli"
version = "0.3.38"
version = "0.3.39"
edition = "2021"
repository = "https://github.com/Near-One/bridge-sdk-rs"
rust-version = "1.88.0"
Expand Down
2 changes: 1 addition & 1 deletion bridge-sdk/connectors/omni-connector/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "omni-connector"
version = "0.3.5"
version = "0.3.6"
edition = "2021"
rust-version = "1.88.0"

Expand Down
10 changes: 7 additions & 3 deletions bridge-sdk/connectors/omni-connector/src/omni_connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ impl OmniConnector {
amount: u128,
transaction_options: TransactionOptions,
) -> Result<CryptoHash> {
let enable_orchard = self.get_orchard_mode(&target_btc_address)?;
let enable_orchard = self.get_orchard_mode(&target_btc_address, chain)?;
let utxo_bridge_client = self.utxo_bridge_client(chain)?;
let fee_rate = utxo_bridge_client.get_fee_rate().await?;

Expand Down Expand Up @@ -762,7 +762,7 @@ impl OmniConnector {
transaction_options: TransactionOptions,
max_gas_fee: Option<u64>,
) -> Result<CryptoHash> {
let enable_orchard = self.get_orchard_mode(&recipient)?;
let enable_orchard = self.get_orchard_mode(&recipient, chain)?;
let near_bridge_client = self.near_bridge_client()?;
let fee = near_bridge_client.get_withdraw_fee(chain).await?;
let (out_points, tx_outs, chain_specific_data, gas_fee) = self
Expand Down Expand Up @@ -2007,7 +2007,11 @@ impl OmniConnector {
wormhole_bridge_client.get_vaa_by_tx_hash(tx_hash).await
}

pub fn get_orchard_mode(&self, target_btc_address: &str) -> Result<bool> {
pub fn get_orchard_mode(&self, target_btc_address: &str, chain: ChainKind) -> Result<bool> {
if chain != ChainKind::Zcash {
return Ok(false);
}

let has_orchard = utxo_utils::contains_orchard_address(target_btc_address)
.map_err(|err| BridgeSdkError::InvalidArgument(format!("Invalid address: {err}")))?;

Expand Down
4 changes: 2 additions & 2 deletions rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.88.0"
components = ["clippy", "rustfmt"]
channel = "1.93.0"
components = ["clippy", "rustfmt"]
Loading