Skip to content

Commit

Permalink
fix watcher taker-side bug after restart
Browse files Browse the repository at this point in the history
  • Loading branch information
caglaryucekaya committed Jul 11, 2023
1 parent 19c8218 commit 6402adf
Show file tree
Hide file tree
Showing 4 changed files with 578 additions and 19 deletions.
3 changes: 2 additions & 1 deletion mm2src/mm2_main/src/lp_swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ pub use swap_watcher::{process_watcher_msg, watcher_topic, TakerSwapWatcherData,
use taker_swap::TakerSwapEvent;
pub use taker_swap::{calc_max_taker_vol, check_balance_for_taker_swap, max_taker_vol, max_taker_vol_from_available,
run_taker_swap, taker_swap_trade_preimage, RunTakerSwapInput, TakerSavedSwap, TakerSwap,
TakerSwapData, TakerSwapPreparedParams, TakerTradePreimage, WATCHER_MESSAGE_SENT_LOG};
TakerSwapData, TakerSwapPreparedParams, TakerTradePreimage, MAKER_PAYMENT_SPENT_BY_WATCHER_LOG,
TAKER_PAYMENT_REFUNDED_BY_WATCHER_LOG, WATCHER_MESSAGE_SENT_LOG};
pub use trade_preimage::trade_preimage_rpc;

pub const SWAP_PREFIX: TopicPrefix = "swap";
Expand Down
2 changes: 1 addition & 1 deletion mm2src/mm2_main/src/lp_swap/saved_swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ impl SavedSwap {
Ok(try_s!(maker_swap.recover_funds().await))
},
SavedSwap::Taker(saved) => {
let (taker_swap, _) = try_s!(TakerSwap::load_from_saved(ctx, maker_coin, taker_coin, saved));
let (taker_swap, _) = try_s!(TakerSwap::load_from_saved(ctx, maker_coin, taker_coin, saved).await);
Ok(try_s!(taker_swap.recover_funds().await))
},
}
Expand Down
Loading

0 comments on commit 6402adf

Please sign in to comment.