mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-12-25 07:29:32 -05:00
Bob can verify the Monero txs by tx-hash
Print tx-hashes for monero transactions to allow Bob to look the transaction up in block explorer. The story of Bab: Our famous actor Bob has a brother named Bab. In school they were often mixed up, because their names were so similar. Eventually Bab renamed himself into Barbara, but that was even more confusing for now he carried a female name even though he was not female. Bob wanted to help his brother and told him he could just go for Bub. But that did not solve anything. Fun fact: Bub is actually married to Alice.
This commit is contained in:
parent
cba9f119b6
commit
47a31760c0
@ -194,10 +194,9 @@ impl Wallet {
|
||||
|
||||
if proof.confirmations > confirmations.load(Ordering::SeqCst) {
|
||||
confirmations.store(proof.confirmations, Ordering::SeqCst);
|
||||
info!(
|
||||
"Monero lock tx received {} out of {} confirmations",
|
||||
proof.confirmations, expected_confirmations
|
||||
);
|
||||
|
||||
let txid = &transfer_proof.tx_hash.0;
|
||||
info!(%txid, "Monero lock tx has {} out of {} confirmations", proof.confirmations, expected_confirmations);
|
||||
}
|
||||
|
||||
if proof.confirmations < expected_confirmations {
|
||||
|
@ -308,7 +308,11 @@ async fn run_until_internal(
|
||||
// Ensure that the generated wallet is synced so we have a proper balance
|
||||
monero_wallet.refresh().await?;
|
||||
// Sweep (transfer all funds) to the given address
|
||||
monero_wallet.sweep_all(receive_monero_address).await?;
|
||||
let tx_hashes = monero_wallet.sweep_all(receive_monero_address).await?;
|
||||
|
||||
for tx_hash in tx_hashes {
|
||||
tracing::info!("Sent XMR to {} in tx {}", receive_monero_address, tx_hash.0);
|
||||
}
|
||||
|
||||
let state = BobState::XmrRedeemed {
|
||||
tx_lock_id: state.tx_lock_id(),
|
||||
|
Loading…
Reference in New Issue
Block a user