Batch: resolve issues #2747, #2746, #2745, #2743, #2742, #2741, #2729, #2749

Resolve #2747 Resolve #2746 Resolve #2745 Resolve #2743 Resolve #2742 Resolve #2741 Resolve #2729 Resolve #2749

This MR implements the changes described in issues #2747, #2746, #2745, #2743, #2742, #2741, #2729, #2749.

Summary

  • #2747: Guard zero assetDisbursement in claimingSwapRuneToTCY — skip swap when TCY pool cannot provide meaningful output, preventing non-atomic failure from zero-amount coin transfer
  • #2746 & #2745: Reorder redeemSynthAssetToReserve to perform SendFromModuleToModule before SetPool and SetPoolRagnarokStart, and return the error instead of swallowing it — ensures state is only mutated when RUNE transfer succeeds
  • #2743: Reorder payPoolRewards to transfer RUNE from Reserve to Asgard before updating pool's BalanceRune in state — prevents phantom RUNE on transfer failure
  • #2742: Only zero pool.BalanceRune and pool.PendingInboundRune in withdrawLiquidity after confirming SendFromModuleToModule succeeds — preserves accurate accounting on transfer failure
  • #2741: Replace stale return err with return nil at end of withdrawLiquidity — all errors in tail section are intentionally non-fatal and already logged
  • #2729: Add continue when GetTxOut fails in migrateFunds — skip the height instead of using empty TxOut that inflates available coin calculations
  • #2749: Use common.NewTxID() instead of direct TxID cast in createSwapToOverSolvency — follows codebase convention of uppercasing TxIDs

Merge request reports

Loading
Loading