Skip to content

Commit 19f6cc0

Browse files
authored
fix: don't wait for inclusion when finalizing transfers on evm (#259)
* fix: don't wait for transaction inclusion when finalizing transfers on evm * chore: bump versions
1 parent ee86758 commit 19f6cc0

6 files changed

Lines changed: 15 additions & 16 deletions

File tree

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bridge-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bridge-cli"
3-
version = "0.3.44"
3+
version = "0.3.45"
44
edition = "2021"
55
repository = "https://github.com/Near-One/bridge-sdk-rs"
66
rust-version = "1.88.0"

bridge-cli/src/omni_connector_command.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,7 @@ async fn fetch_indexer_fees(
109109
.await
110110
.map_err(|e| format!("Failed to fetch transfer fee: {e}"))?;
111111

112-
let transferred_fee = fee
113-
.transferred_token_fee
114-
.ok_or("Missing transferred_token_fee in response")?
115-
.0;
112+
let transferred_fee = fee.transferred_token_fee.map(|v| v.0).unwrap_or_default();
116113

117114
Ok((
118115
transferred_fee,

bridge-sdk/bridge-clients/evm-bridge-client/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "evm-bridge-client"
3-
version = "0.3.4"
3+
version = "0.3.5"
44
edition = "2021"
55
rust-version = "1.88.0"
66

bridge-sdk/bridge-clients/evm-bridge-client/src/evm_bridge_client.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -336,12 +336,13 @@ impl EvmBridgeClient {
336336
Some(FIN_TRANSFER_GAS),
337337
);
338338

339-
let receipt = call_builder.send().await?.get_receipt().await?;
339+
let pending = call_builder.send().await?;
340+
let tx_hash = *pending.tx_hash();
340341
tracing::info!(
341-
tx_hash = format!("{:?}", receipt.transaction_hash),
342+
tx_hash = format!("{tx_hash:?}"),
342343
"Sent finalize transfer transaction"
343344
);
344-
Ok(receipt.transaction_hash)
345+
Ok(tx_hash)
345346
}
346347
ChainKind::Eth | ChainKind::Base | ChainKind::Arb | ChainKind::Bnb | ChainKind::Pol => {
347348
let bridge_deposit = OmniBridge::TransferMessagePayloadWithoutMessage {
@@ -363,12 +364,13 @@ impl EvmBridgeClient {
363364
Some(FIN_TRANSFER_GAS),
364365
);
365366

366-
let receipt = call_builder.send().await?.get_receipt().await?;
367+
let pending = call_builder.send().await?;
368+
let tx_hash = *pending.tx_hash();
367369
tracing::info!(
368-
tx_hash = format!("{:?}", receipt.transaction_hash),
370+
tx_hash = format!("{tx_hash:?}"),
369371
"Sent finalize transfer transaction"
370372
);
371-
Ok(receipt.transaction_hash)
373+
Ok(tx_hash)
372374
}
373375
ChainKind::Near
374376
| ChainKind::Sol

bridge-sdk/connectors/omni-connector/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "omni-connector"
3-
version = "0.3.8"
3+
version = "0.3.9"
44
edition = "2021"
55
rust-version = "1.88.0"
66

0 commit comments

Comments
 (0)