fix(legacy-swap): taker failed spend maker payment marked as failed#2199
fix(legacy-swap): taker failed spend maker payment marked as failed#2199
Conversation
…d_taker_expected.json
…sts, iris_nimda_rick_taker_swap.json
|
Second problem solving approach If we wouldn't like to do changes in legacy taker swap events/logic and increase backward incompatibility risks, there is an alternative. We can add maker payment spend confirmation right after If confirmation failed, then also return swap finish command and MakerPaymentSpendFailed event return Ok((Some(TakerSwapCommand::Finish), vec![
TakerSwapEvent::MakerPaymentSpendFailed(ERRL!("{}", err.get_plain_text_format()).into()),
]));
In comparison, Maker has taker payment spend confirmation events in |
|
Solved with second approach in this pr #2206 UPD: opened again as we decided to test both approaches #2206 (comment)
This pr approach could be preferable |
…d::ConfirmMakerPaymentSpend)
…d => Ok(command),
…and_add_event(ctx, swap, saved).await in taker restart
…pCommand::Finish),
…TS in for_tests.rs
|
@laruh this is still draft, should I review it? I want to check it so that I can close the other PR if there are no problems with the approach here. |
Its almost r2r, I just wanted to fix these notes #2206 (review) in other approach and cherry pick commit to this branch, as both branches would have the same review notes. (already fixed this b2446b9, just confirmation number is left) |
… in is_recoverable function
cd75bd0 to
aed8d4c
Compare
d2fd10f to
5ce137f
Compare
…nfirm_taker_payment_spend
…Swap and MakerSavedSwap" This reverts commit 5ce137f.
shamardy
left a comment
There was a problem hiding this comment.
LGTM but for one nit!
Please open docs issue and add To Test comment to the PR opening comment.
|
* dev: fix(orders): fix cancel order race condition using time-based cache (#2232) fix(legacy-swap): taker failed spend maker payment marked as failed (#2199) chore(adex-cli): deprecate adex-cli (#2234) feat(new-RPC): connection healthcheck implementation for peers (#2194) fix(proxy-signature): add message lifetime overflows (#2233) feat(CI): handle remote files in a safer way (#2217) chore(doc): update issue address in README (#2227) fix(merge): remove duplicated db_root function (#2229) feat(wallets): add `get_wallet_names` rpc (#2202) chore(tests): don't use `.wait()` and use `block_on` instead (#2220) fix(native-rpc): remove escaped response body (#2219) fix(clippy): fix coins mod clippy warnings in wasm (#2224) feat(core): handling CTRL-C signal with graceful shutdown (#2213) docs(README): fix typos (#2212) remove the non-sense arguments (#2216) fix(db): stop creating the all-zeroes dir on KDF start (#2218)
* dev: fix(orders): fix cancel order race condition using time-based cache (#2232) fix(legacy-swap): taker failed spend maker payment marked as failed (#2199) chore(adex-cli): deprecate adex-cli (#2234) feat(new-RPC): connection healthcheck implementation for peers (#2194) fix(proxy-signature): add message lifetime overflows (#2233) feat(CI): handle remote files in a safer way (#2217) chore(doc): update issue address in README (#2227) fix(merge): remove duplicated db_root function (#2229) feat(wallets): add `get_wallet_names` rpc (#2202) chore(tests): don't use `.wait()` and use `block_on` instead (#2220) fix(native-rpc): remove escaped response body (#2219) fix(clippy): fix coins mod clippy warnings in wasm (#2224) feat(core): handling CTRL-C signal with graceful shutdown (#2213) docs(README): fix typos (#2212) remove the non-sense arguments (#2216) fix(db): stop creating the all-zeroes dir on KDF start (#2218)
* dev: fix(cosmos): fix tx broadcasting error (#2238) chore(solana): remove solana implementation (#2239) chore(cli): remove leftover subcommands from help message (#2235) fix(orders): fix cancel order race condition using time-based cache (#2232) fix(legacy-swap): taker failed spend maker payment marked as failed (#2199) chore(adex-cli): deprecate adex-cli (#2234) feat(new-RPC): connection healthcheck implementation for peers (#2194) fix(proxy-signature): add message lifetime overflows (#2233) feat(CI): handle remote files in a safer way (#2217) chore(doc): update issue address in README (#2227) fix(merge): remove duplicated db_root function (#2229) feat(wallets): add `get_wallet_names` rpc (#2202) chore(tests): don't use `.wait()` and use `block_on` instead (#2220) fix(native-rpc): remove escaped response body (#2219) fix(clippy): fix coins mod clippy warnings in wasm (#2224) feat(core): handling CTRL-C signal with graceful shutdown (#2213) docs(README): fix typos (#2212) remove the non-sense arguments (#2216) fix(db): stop creating the all-zeroes dir on KDF start (#2218)
related to #2175 (comment)
To fix issue where taker doesnt wait for maker payment spend tx was confirmed we added two new events:
"MakerPaymentSpendConfirmed": successful event, which goes after"MakerPaymentSpent"Note:
MakerPaymentSpentevent means that broadcasted txtaker spends maker paymentjust wasn't reverted"MakerPaymentSpendConfirmFailed": error event, means thattaker spend maker paymenttransaction confirmation was failed.