add moar limit swap regression tests

Adding more limit swap regression tests with comprehensive assertions.

Test Suites Added

  • mod-limit-swap-auth.yaml — Tests authorization enforcement for limit swap modifications across native RUNE swaps and cross-chain BTC swaps
  • secured-asset-limit-swaps.yaml — Tests full lifecycle of limit swaps with secured assets (BTC-BTC, ETH-ETH)

Review Comments Addressed

  • Added asgard invariant check to mod-limit-swap-auth test
  • Changed >= to deterministic == with captured variable for ETH swap output
  • Added eth-eth balance unchanged assertion at queue insertion time
  • Added trade_target assertion for remaining swap after cancellation
  • Added BTC-BTC balance decrease assertion after swap execution
  • Used select(.denom == ...) pattern consistently for all balance checks
  • Removed unused QUOTE_AMOUNT and ETH_SWAP_OUT variable captures
  • Fixed limit_swap_mod event assertion to use map(select(...))|length
  • Added >= 45000000 target threshold assertion for ETH-ETH swap output
  • Made BTC-BTC decrease assertion deterministic with variable capture
  • Added ETH-ETH balance check after swap queued (before cancel)
  • Used distinctive target value (6666666) in auth test memo
  • Removed unused ETH_SWAP_OUT and BTC_AFTER variable captures, replaced with plain string literals
  • Fixed misleading native_txid comments on failed transactions (no native_txid assigned on DeliverTx failure)
  • Added debuggability comment for distinctive 6666666 target value
  • Added limit_swap_close event assertion for BTC swap cancellation in Test 7
  • Added source asset assertion (.swap.tx.coins[0].asset == "THOR.RUNE") to confirm which swap survived cancellation
Edited by Son of Odin

Merge request reports

Loading