mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-11-27 03:06:24 -05:00
parent
683d565679
commit
5463bde4f8
12 changed files with 135 additions and 13 deletions
|
|
@ -61,8 +61,10 @@ async fn next_state(
|
|||
tracing::trace!(%state, "Advancing state");
|
||||
|
||||
Ok(match state {
|
||||
BobState::Started { btc_amount } => {
|
||||
let bitcoin_refund_address = bitcoin_wallet.new_address().await?;
|
||||
BobState::Started {
|
||||
btc_amount,
|
||||
change_address,
|
||||
} => {
|
||||
let tx_refund_fee = bitcoin_wallet
|
||||
.estimate_fee(TxRefund::weight(), btc_amount)
|
||||
.await?;
|
||||
|
|
@ -76,7 +78,7 @@ async fn next_state(
|
|||
btc: btc_amount,
|
||||
tx_refund_fee,
|
||||
tx_cancel_fee,
|
||||
bitcoin_refund_address,
|
||||
bitcoin_refund_address: change_address,
|
||||
})
|
||||
.await?;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue