Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit 19cd17e

Browse files
Don't save twice after fedimint deposit happens
1 parent 4ea794a commit 19cd17e

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

mutiny-core/src/federation.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,7 @@ async fn process_onchain_deposit_outcome<S: MutinyStorage>(
17041704
let output = tx.btc_transaction.output[tx.out_idx as usize].clone();
17051705

17061706
// store as confirmed 0 block height until we can check esplora after
1707-
let updated_transaction_details = TransactionDetails {
1707+
let transaction_details_update = TransactionDetails {
17081708
transaction: None,
17091709
txid: Some(txid),
17101710
internal_id,
@@ -1715,17 +1715,8 @@ async fn process_onchain_deposit_outcome<S: MutinyStorage>(
17151715
labels: labels.clone(),
17161716
};
17171717

1718-
match persist_transaction_details(&storage, &updated_transaction_details) {
1719-
Ok(_) => {
1720-
log_info!(logger, "Transaction updated");
1721-
},
1722-
Err(e) => {
1723-
log_error!(logger, "Error updating transaction: {e}");
1724-
},
1725-
}
1726-
17271718
// we need to get confirmations for this txid and update
1728-
subscribe_onchain_confirmation_check(storage.clone(), esplora.clone(), txid, updated_transaction_details, stop.clone(), logger.clone()).await;
1719+
subscribe_onchain_confirmation_check(storage.clone(), esplora.clone(), txid, transaction_details_update, stop.clone(), logger.clone()).await;
17291720
}
17301721
fedimint_wallet_client::DepositState::Claimed(_) => {
17311722
// Nothing really to change from confirmed to claimed

0 commit comments

Comments
 (0)